home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / Graphics.mod < prev    next >
Text File  |  1995-06-29  |  110KB  |  3,261 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Graphics.mod $
  4.   Description: Interface to graphics.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *>
  23.  
  24. MODULE [2] Graphics;
  25.  
  26. IMPORT
  27.   SYS := SYSTEM, Kernel, e := Exec, h := Hardware, u := Utility,
  28.   s := Sets;
  29.  
  30. (**
  31. **      All pointers are declared forward here for convenience.
  32. *)
  33.  
  34. TYPE
  35.  
  36.   RectanglePtr *            = POINTER TO Rectangle;
  37.   Rect32Ptr *               = POINTER TO Rect32;
  38.   PointPtr *                = POINTER TO Point;
  39.   BitMapPtr *               = POINTER TO BitMap;
  40.   ExtendedNodePtr *         = POINTER TO ExtendedNode;
  41.   AnalogSignalIntervalPtr * = POINTER TO AnalogSignalInterval;
  42.   SpecialMonitorPtr *       = POINTER TO SpecialMonitor;
  43.   MonitorSpecPtr *          = POINTER TO MonitorSpec;
  44.   QueryHeaderPtr *          = POINTER TO QueryHeader;
  45.   DisplayInfoPtr *          = POINTER TO DisplayInfo;
  46.   DimensionInfoPtr *        = POINTER TO DimensionInfo;
  47.   MonitorInfoPtr *          = POINTER TO MonitorInfo;
  48.   NameInfoPtr *             = POINTER TO NameInfo;
  49.   VSpritePtr *              = POINTER TO VSprite;
  50.   BobPtr *                  = POINTER TO Bob;
  51.   AnimCompPtr *             = POINTER TO AnimComp;
  52.   DBufPacketPtr *           = POINTER TO DBufPacket;
  53.   AnimObPtr *               = POINTER TO AnimOb;
  54.   CollTablePtr *            = POINTER TO CollTable;
  55.   AreaInfoPtr *             = POINTER TO AreaInfo;
  56.   TmpRasPtr *               = POINTER TO TmpRas;
  57.   GelsInfoPtr *             = POINTER TO GelsInfo;
  58.   RastPortPtr *             = POINTER TO RastPort;
  59.   CopInsPtr *               = POINTER TO CopIns;
  60.   CopInsCLPtr *             = POINTER TO CopInsCL;
  61.   CprlistPtr *              = POINTER TO Cprlist;
  62.   CopListPtr *              = POINTER TO CopList;
  63.   CopList13Ptr *            = POINTER TO CopList13;
  64.   UCopListPtr *             = POINTER TO UCopList;
  65.   ViewPortPtr *             = POINTER TO ViewPort;
  66.   ViewPtr *                 = POINTER TO View;
  67.   ViewExtraPtr *            = POINTER TO ViewExtra;
  68.   ViewPortExtraPtr *        = POINTER TO ViewPortExtra;
  69.   RasInfoPtr *              = POINTER TO RasInfo;
  70.   ColorMapPtr *             = POINTER TO ColorMap;
  71.   LayerInfoPtr *            = POINTER TO LayerInfo;
  72.   LayerPtr *                = POINTER TO Layer;
  73.   ClipRectPtr *             = POINTER TO ClipRect;
  74.   RegionRectanglePtr *      = POINTER TO RegionRectangle;
  75.   RegionPtr *               = POINTER TO Region;
  76.   SimpleSpritePtr *         = POINTER TO SimpleSprite;
  77.   TextAttrPtr *             = POINTER TO TextAttr;
  78.   TTextAttrPtr *            = POINTER TO TTextAttr;
  79.   TextFontPtr *             = POINTER TO TextFont;
  80.   TextFontExtensionPtr *    = POINTER TO TextFontExtension;
  81.   ColorFontColorsPtr *      = POINTER TO ColorFontColors;
  82.   ColorTextFontPtr *        = POINTER TO ColorTextFont;
  83.   TextextentPtr *           = POINTER TO Textextent;
  84.   IsrvstrPtr *              = POINTER TO Isrvstr;
  85.   BitScaleArgsPtr *         = POINTER TO BitScaleArgs;
  86.   CopListDummyPtr *          = POINTER TO CopListDummy;
  87.   PaletteExtraPtr *         = POINTER TO PaletteExtra;
  88.   DBufInfoPtr *             = POINTER TO DBufInfo;
  89.   ExtSpritePtr *            = POINTER TO ExtSprite;
  90.  
  91.  
  92. (*
  93. **      $VER: gfx.h 39.5 (19.3.92)
  94. **
  95. **      general graphics library definitions
  96. *)
  97.  
  98. TYPE
  99.  
  100.   RectangleBase *= RECORD END;
  101.  
  102.   Rectangle * = RECORD (RectangleBase)
  103.     minX *, minY * : INTEGER;
  104.     maxX *, maxY * : INTEGER;
  105.   END; (* Rectangle *)
  106.  
  107.   Rect32 * = RECORD
  108.     minX *, minY * : LONGINT;
  109.     maxX *, maxY * : LONGINT;
  110.   END; (* Rect32 *)
  111.  
  112.   Point * = RECORD
  113.     x *, y * : INTEGER;
  114.   END; (* Point *)
  115.  
  116.   PLANEPTR * = e.APTR;
  117.  
  118.   BitMap * = RECORD
  119.     bytesPerRow * : e.UWORD;
  120.     rows *        : e.UWORD;
  121.     flags *       : s.SET8;
  122.     depth *       : SHORTINT;
  123.     pad *         : e.UWORD;
  124.     planes *      : ARRAY 8 OF PLANEPTR;
  125.   END; (* BitMap *)
  126.  
  127. CONST
  128.  
  129. (* flags for AllocBitMap, etc. *)
  130.   bmbClear       * = 0;
  131.   bmbDisplayable * = 1;
  132.   bmbInterleaved * = 2;
  133.   bmbStandard    * = 3;
  134.   bmbMinPlanes   * = 4;
  135.  
  136. (* the following are for GetBitMapAttr() *)
  137.   bmaHeight * = 0;
  138.   bmaDepth  * = 4;
  139.   bmaWidth  * = 8;
  140.   bmaFlags  * = 12;
  141.  
  142. (*
  143. **      $VER: gfxnodes.h 39.0 (21.8.91)
  144. **
  145. **      graphics extended node definintions
  146. *)
  147.  
  148. TYPE
  149.  
  150.   ExtendedNodeBase *= RECORD (e.NodeBase) END;
  151.   ExtendedNodeBasePtr *= POINTER TO ExtendedNodeBase;
  152.  
  153.   ExtendedNode * = RECORD (ExtendedNodeBase)
  154.     node *      : e.Node;
  155.     subsystem * : SHORTINT;
  156.     subtype *   : SHORTINT;
  157.     library *   : LONGINT;
  158.     init *      : e.PROC;
  159.   END; (* ExtendedNode *)
  160.  
  161. CONST
  162.  
  163.   ssGraphics *    = 02H;
  164.  
  165.   viewExtraType *        = 1;
  166.   viewPortExtraType *    = 2;
  167.   specialMonitorType *   = 3;
  168.   monitorSpecType *      = 4;
  169.  
  170.  
  171. (*
  172. **      $VER: monitor.h 39.7 (9.6.92)
  173. **
  174. **      graphics monitorspec definintions
  175. *)
  176.  
  177. TYPE
  178.  
  179.   MonitorSpec * = RECORD (ExtendedNodeBase)
  180.     node *                   : ExtendedNode;
  181.     flags *                  : s.SET16;
  182.     ratioh *                 : LONGINT;
  183.     ratiov *                 : LONGINT;
  184.     totalRows *              : e.UWORD;
  185.     totalColorClocks *       : e.UWORD;
  186.     deniseMaxDisplayColumn * : e.UWORD;
  187.     beamCon0 *               : e.UWORD;
  188.     minRow *                 : e.UWORD;
  189.     special *                : SpecialMonitorPtr;
  190.     openCount *              : e.UWORD;
  191.     transform *              : e.PROC;
  192.     translate *              : e.PROC;
  193.     scale *                  : e.PROC;
  194.     xoffset *                : e.UWORD;
  195.     yoffset *                : e.UWORD;
  196.     legalView *              : Rectangle;
  197.     maxoscan *               : e.PROC; (* maximum legal overscan *)
  198.     videoscan *              : e.PROC; (* video display overscan *)
  199.     deniseMinDisplayColumn * : e.UWORD;
  200.     displayCompatible *      : e.ULONG;
  201.     displayInfoDataBase *    : e.List;
  202.     displayInfoDataBaseSemaphore * : e.SignalSemaphore;
  203.     mrgCop *                 : e.PROC;
  204.     loadView *               : e.PROC;
  205.     killView *               : e.PROC;
  206.   END; (* MonitorSpec *)
  207.  
  208. CONST
  209.  
  210.   toMonitor *       = 0;
  211.   fromMonitor *     = 1;
  212.   standardXOffset * = 9;
  213.   standardYOffset * = 0;
  214.  
  215.   msbRequestNTSC    * = 0;
  216.   msbRequestPAL     * = 1;
  217.   msbRequestSpecial * = 2;
  218.   msbRequestA2024   * = 3;
  219.   msbDoubleSprites  * = 4;
  220.  
  221. (* obsolete, v37 compatible definitions follow *)
  222.   requestNTSC *     = 1;
  223.   requestPAL *      = 2;
  224.   requestSpecial *  = 4;
  225.   requestA2024 *    = 8;
  226.  
  227.   defaultMonitorName *    = "default.monitor";
  228.   ntscMonitorName *       = "ntsc.monitor";
  229.   palMonitorName *        = "pal.monitor";
  230.   standardMonitorMask *   = requestNTSC + requestPAL;
  231.  
  232.   standardNTSCRows *      = 262;
  233.   standardPALRows *       = 312;
  234.   standardColorClocks *   = 226;
  235.   standardDeniseMax *     = 455;
  236.   standardDeniseMin *     = 93;
  237.   standardNTSCBeamCon *   = {};
  238.   standardPALBeamCon *    = {h.displayPAL};
  239.  
  240.   specialBeamcon * =
  241.     { h.varVBlank, h.loLDis, h.varVSync,
  242.       h.varHSync, h.varBeam, h.csBlank, h.vSyncTrue };
  243.  
  244.   minNTSCRow *      = 21;
  245.   minPALRow *       = 29;
  246.   standardViewX *   = 81H;
  247.   standardViewY *   = 2CH;
  248.   standardHBstrt *  = 06H;
  249.   standardHSstrt *  = 0BH;
  250.   standardHSstop *  = 1CH;
  251.   standardHBstop *  = 2CH;
  252.   standardVBstrt *  = 0122H;
  253.   standardVSstrt *  = 02A6H;
  254.   standardVSstop *  = 03AAH;
  255.   standardVBstop *  = 1066H;
  256.  
  257.   vgaColorClocks *  = standardColorClocks DIV 2;
  258.   vgaTotalRows *    = standardNTSCRows *  2;
  259.   vgaDeniseMin *    = 59;
  260.   minvgaRow *       = 29;
  261.   vgaHBstrt *       = 08H;
  262.   vgaHSstrt *       = 0EH;
  263.   vgaHSstop *       = 1CH;
  264.   vgaHBstop *       = 1EH;
  265.   vgaVBstrt *       = 0000H;
  266.   vgaVSstrt *       = 0153H;
  267.   vgaVSstop *       = 0235H;
  268.   vgaVBstop *       = 0CCDH;
  269.  
  270.   vgaMonitorName *    = "vga.monitor";
  271.  
  272. (* NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
  273.  * implemented.
  274.  *)
  275.   vga70ColorClocks *  = standardColorClocks DIV 2;
  276.   vga70TotalRows *    = 449;
  277.   vga70DeniseMin *    = 59;
  278.   minvga70Row *       = 35;
  279.   vga70HBstrt *       = 08H;
  280.   vga70HSstrt *       = 0EH;
  281.   vga70HSstop *       = 1CH;
  282.   vga70HBstop *       = 1EH;
  283.   vga70VBstrt *       = 0000H;
  284.   vga70VSstrt *       = 02A6H;
  285.   vga70VSstop *       = 0388H;
  286.   vga70VBstop *       = 0F73H;
  287.  
  288.   vga70beamcon *      = specialBeamcon / { h.vSyncTrue };
  289.   vga70MonitorName *  = "vga70.monitor";
  290.  
  291.   broadcastHBstrt *        = 01H;
  292.   broadcastHSstrt *        = 06H;
  293.   broadcastHSstop *        = 17H;
  294.   broadcastHBstop *        = 27H;
  295.   broadcastVBstrt *        = 0000H;
  296.   broadcastVSstrt *        = 02A6H;
  297.   broadcastVSstop *        = 054CH;
  298.   broadcastVBstop *        = 1C40H;
  299.   broadcastBeamCon *       = { h.loLDis, h.csBlank };
  300.   ratioFixedPart *         = 4;
  301.   ratioUnity *             = (*ASH (1, ratioFixedPart)*) 16;
  302.  
  303. TYPE
  304.  
  305.   AnalogSignalInterval * = RECORD
  306.     start * : e.UWORD;
  307.     stop *  : e.UWORD;
  308.   END; (* AnalogSignalInterval *)
  309.  
  310.   SpecialMonitor * = RECORD (ExtendedNodeBase)
  311.     node *      : ExtendedNode;
  312.     flags *     : s.SET16;
  313.     doMonitor * : e.PROC;
  314.     reserved1 * : e.PROC;
  315.     reserved2 * : e.PROC;
  316.     reserved3 * : e.PROC;
  317.     hblank *    : AnalogSignalInterval;
  318.     vblank *    : AnalogSignalInterval;
  319.     hsync *     : AnalogSignalInterval;
  320.     vsync *     : AnalogSignalInterval;
  321.   END; (* SpecialMonitor *)
  322.  
  323.  
  324. (*
  325. **      $VER: display.h 39.0 (21.8.91)
  326. **
  327. **      definitions for display control registers
  328. *)
  329.  
  330.  
  331. CONST
  332.  
  333. (* bplcon0 defines *)
  334.   mode640 *      = 15;
  335.   plnCntMsk *    = {0..2};     (* how many bit planes? *)
  336.                                (* 0 = none, 1->6 = 1->6, 7 = reserved *)
  337.   plnCntShft *   = 12;         (* bits to shift for bplcon0 *)
  338.   pf2pri *       = 6;          (* bplcon2 bit *)
  339.   colorOn *      = 9;          (* disable color burst *)
  340.   dblpf *        = 10;
  341.   holdnmodify *  = 11;
  342.   interlace *    = 2;          (* interlace mode for 400 *)
  343.  
  344. (* bplcon1 defines *)
  345.   fineScroll *      = {0..3};
  346.   fineScrollShift * = 4;
  347.   fineScrollMask *  = {0..3};
  348.  
  349. (* display window start and stop defines *)
  350.   horizPos *      = {0..6};      (* horizontal start/stop *)
  351.   vrtclPos *      = {0..8};      (* vertical start/stop *)
  352.   vrtclPosShift * = 7;
  353.  
  354. (* Data fetch start/stop horizontal position *)
  355.   dftchMask *       = {0..7};
  356.  
  357. (* vposr bits *)
  358.   vposrlof *        = {15};
  359.  
  360.  
  361.  
  362. (*
  363. **      $VER: displayinfo.h 39.13 (31.5.93)
  364. **
  365. **      definitions for displayinfo database
  366. *)
  367.  
  368.  
  369. TYPE
  370.  
  371. (* the "public" handle to a DisplayInfoRecord *)
  372.  
  373.   DisplayInfoHandle * = e.APTR;
  374.  
  375. CONST
  376.  
  377. (* datachunk type identifiers *)
  378.  
  379.   dtagDisp *               = 80000000H;
  380.   dtagDims *               = 80001000H;
  381.   dtagMntr *               = 80002000H;
  382.   dtagName *               = 80003000H;
  383.   dtagVec  *               = 80004000H;   (* internal use only *)
  384.  
  385. TYPE
  386.  
  387.   QueryHeaderBase *= RECORD END;
  388.  
  389.   QueryHeader * = RECORD (QueryHeaderBase)
  390.     structID *  : e.ULONG;  (* datachunk type identifier *)
  391.     displayID * : e.ULONG;  (* copy of display record key   *)
  392.     skipID *    : e.ULONG;  (* tagSKIP -- see tagitems.h *)
  393.     length *    : e.ULONG;  (* length of local data in double-longwords *)
  394.   END; (* QueryHeader *)
  395.  
  396.   DisplayInfo * = RECORD (QueryHeaderBase)
  397.     header *        : QueryHeader;
  398.     notAvailable *  : s.SET16;  (* if NULL available, else see defines *)
  399.     propertyFlags * : s.SET32;  (* Properties of this mode see defines *)
  400.     resolution *    : Point;    (* ticks-per-pixel X/Y                 *)
  401.     pixelSpeed *    : e.UWORD;  (* aproximation in nanoseconds         *)
  402.     numStdSprites * : e.UWORD;  (* number of standard amiga sprites    *)
  403.     paletteRange *  : e.UWORD;  (* distinguishable shades available    *)
  404.     spriteResolution * : Point; (* std sprite ticks-per-pixel X/Y    *)
  405.     pad * : ARRAY 4 OF e.UBYTE; (* used internally *)
  406.     redBits *       : e.UBYTE;  (* number of Red bits this display supports (V39) *)
  407.     greenBits *     : e.UBYTE;  (* number of Green bits this display supports (V39) *)
  408.     blueBits *      : e.UBYTE;  (* number of Blue bits this display supports (V39) *)
  409.  (* pad2 * : ARRAY 5 OF e.UBYTE; (* find some use for this. *)
  410.     Allow for different alignment rules (?) *)
  411.     pad2 * : ARRAY 4 OF e.UBYTE; (* find some use for this. *)
  412.     reserved * : ARRAY 2 OF e.ULONG; (* terminator *)
  413.   END; (* DisplayInfo *)
  414.  
  415. CONST
  416.  
  417. (* availability *)
  418.  
  419.   availNoChips *        = {0};
  420.   availNoMonitor *      = {1};
  421.   availNotWithGenlock * = {2};
  422.  
  423. (* mode properties *)
  424.  
  425.   isLace *            = 0;
  426.   isDualPF *          = 1;
  427.   isPF2Pri *          = 2;
  428.   isHAM *             = 3;
  429.  
  430.   isECS *             = 4;  (*      note: ECS modes (SHIRES, VGA, and **
  431.                             **      PRODUCTIVITY) do not support      **
  432.                             **      attached sprites.                 **
  433.                             *)
  434.  
  435.   isAA *              = 16;  (* AA modes - may only be available
  436.                              ** if machine has correct memory
  437.                              ** type to support required
  438.                              ** bandwidth - check availability.
  439.                              ** (V39)
  440.                              *)
  441.  
  442.   isPAL     *          = 5;
  443.   isSprites *          = 6;
  444.   isGenlock *          = 7;
  445.  
  446.   isWB *               = 8;
  447.   isDraggable *        = 9;
  448.   isPanelled *         = 10;
  449.   isBeamSync *         = 11;
  450.  
  451.   isExtraHalfBrite *   = 12;
  452.  
  453. (* The following dipIs... flags are new for V39 *)
  454.   isSpritesAtt      * = 13;  (* supports attached sprites *)
  455.   isSpritesChngRes  * = 14;  (* supports variable sprite resolution *)
  456.   isSpritesBorder   * = 15;  (* sprite can be displayed in the border *)
  457.   isScanDbl         * = 17;  (* scan doubled *)
  458.   isSpritesChngBase * = 18;
  459.   isSpritesChngPri  * = 19;
  460.   isDBuffer         * = 20;  (* can support double buffering *)
  461.   isProgBeam        * = 21;  (* is a programmed beam-sync mode *)
  462.   isForeign         * = 31;  (* this mode is not native to the Amiga *)
  463.  
  464. TYPE
  465.  
  466.   DimensionInfo * = RECORD (QueryHeaderBase)
  467.     header *          : QueryHeader;
  468.     maxDepth *        : e.UWORD;      (* log2( max number of colors ) *)
  469.     minRasterWidth *  : e.UWORD;      (* minimum width in pixels      *)
  470.     minRasterHeight * : e.UWORD;      (* minimum height in pixels     *)
  471.     maxRasterWidth *  : e.UWORD;      (* maximum width in pixels      *)
  472.     maxRasterHeight * : e.UWORD;      (* maximum height in pixels     *)
  473.     nominal *         : Rectangle;    (* "standard" dimensions        *)
  474.     maxOScan *        : Rectangle;    (* fixed, hardware dependant    *)
  475.     videoOScan *      : Rectangle;    (* fixed, hardware dependant    *)
  476.     txtOScan *        : Rectangle;    (* editable via preferences     *)
  477.     stdOScan *        : Rectangle;    (* editable via preferences     *)
  478.     pad *             : ARRAY 14 OF e.UBYTE;
  479.     reserved *        : ARRAY 2 OF e.ULONG;          (* terminator *)
  480.   END; (* DimensionInfo *)
  481.  
  482.   MonitorInfo * = RECORD (QueryHeaderBase)
  483.     header *              : QueryHeader;
  484.     mspc *                : MonitorSpecPtr; (* pointer to monitor specification  *)
  485.     viewPosition *        : Point;          (* editable via preferences          *)
  486.     viewResolution *      : Point;          (* standard monitor ticks-per-pixel  *)
  487.     viewPositionRange *   : Rectangle;      (* fixed, hardware dependant *)
  488.     totalRows *           : e.UWORD;        (* display height in scanlines       *)
  489.     totalColorClocks *    : e.UWORD;        (* scanline width in 280 ns units    *)
  490.     minRow *              : e.UWORD;        (* absolute minimum active scanline  *)
  491.     compatibility *       : INTEGER;        (* how this coexists with others     *)
  492.     pad *                 : ARRAY 36 OF e.UBYTE;
  493.     defaultViewPosition * : Point;          (* original, never changes *)
  494.     preferredModeID *     : e.ULONG;        (* for Preferences *)
  495.     reserved *            : ARRAY 2 OF e.ULONG;          (* terminator *)
  496.   END; (* MonitorInfo *)
  497.  
  498. CONST
  499.  
  500. (* monitor compatibility *)
  501.  
  502.   mCompatMixed *   = 0;      (* can share display with other mcompatMIXED *)
  503.   mCompatSelf *    = 1;      (* can share only within same monitor *)
  504.   mCompatNobody *  = -1;     (* only one viewport at a time *)
  505.  
  506.   displayNameLen * = 32;
  507.  
  508. TYPE
  509.  
  510.   NameInfo * = RECORD (QueryHeaderBase)
  511.     header *   : QueryHeader;
  512.     name *     : ARRAY displayNameLen OF CHAR;
  513.     reserved * : ARRAY 2 OF e.ULONG;          (* terminator *)
  514.   END; (* NameInfo *)
  515.  
  516. (*
  517. **      $VER: modeid.h 39.9 (27.5.93)
  518. **
  519. **      graphics display mode IDs.
  520. *)
  521.  
  522. CONST
  523.  
  524. (* DisplayInfoRecord identifiers *)
  525.  
  526.   invalidID *             = -1; (* ~0 *)
  527.  
  528. (* With all the new modes that are available under V38 and V39, it is highly
  529.  * recommended that you use either the asl.library screenmode requester,
  530.  * and/or the V39 graphics.library function BestModeIDA().
  531.  *
  532.  * DO NOT interpret the any of the bits in the ModeID for its meaning. For
  533.  * example, do not interpret bit 3 (0x4) as meaning the ModeID is interlaced.
  534.  * Instead, use GetDisplayInfoData() with dtagDisp, and examine the dip...
  535.  * flags to determine a ModeID's characteristics. The only exception to
  536.  * this rule is that bit 7 (0x80) will always mean the ModeID is
  537.  * ExtraHalfBright, and bit 11 (0x800) will always mean the ModeID is HAM.
  538.  *)
  539.  
  540. (* normal identifiers *)
  541.  
  542.   monitorIDMask *         = 0FFFF1000H;
  543.  
  544.   defaultMonitorID *      = 00000000H;
  545.   ntscMonitorID *         = 00011000H;
  546.   palMonitorID *          = 00021000H;
  547.  
  548. (* the following 22 composite keys are for Modes on the default Monitor.
  549.  * NTSC & PAL "flavors" of these particular keys may be made by or'ing
  550.  * the NTSC or PAL monitorId with the desired modeKey...
  551.  *
  552.  * For example, to specifically open a PAL HAM interlaced ViewPort
  553.  * (or intuition screen), you would use the modeid of
  554.  * (palMonitorId | hamlaceKey)
  555.  *)
  556.  
  557.   loresKey *                   = 00000000H;
  558.   hiresKey *                   = 00008000H;
  559.   superKey *                   = 00008020H;
  560.   hamKey *                     = 00000800H;
  561.   loresLaceKey *               = 00000004H;
  562.   hiresLaceKey *               = 00008004H;
  563.   superLaceKey *               = 00008024H;
  564.   hamLaceKey *                 = 00000804H;
  565.   loresDPFKey *                = 00000400H;
  566.   hiresDPFKey *                = 00008400H;
  567.   superDPFKey *                = 00008420H;
  568.   loresLaceDPFKey *            = 00000404H;
  569.   hiresLaceDPFKey *            = 00008404H;
  570.   superLaceDPFKey *            = 00008424H;
  571.   loresDPF2Key *               = 00000440H;
  572.   hiresDPF2Key *               = 00008440H;
  573.   superDPF2Key *               = 00008460H;
  574.   loresLaceDPF2Key *           = 00000444H;
  575.   hiresLaceDPF2Key *           = 00008444H;
  576.   superLaceDPF2Key *           = 00008464H;
  577.   extraHalfBriteKey *          = 00000080H;
  578.   extraHalfBriteLaceKey *      = 00000084H;
  579. (* New for AA ChipSet (V39) *)
  580.   hiresHAMKey *                = 00008800H;
  581.   superHAMKey *                = 00008820H;
  582.   hiresEHBKey *                = 00008080H;
  583.   superEHBKey *                = 000080A0H;
  584.   hiresHAMLaceKey *            = 00008804H;
  585.   superHAMLaceKey *            = 00008824H;
  586.   hiresEHBLaceKey *            = 00008084H;
  587.   superEHBLaceKey *            = 000080A4H;
  588. (* Added for V40 - may be useful modes for some games or animations. *)
  589.   loresSDblKey *               = 00000008H;
  590.   loresHAMSDblKey *            = 00000808H;
  591.   loresEHBSDblKey *            = 00000088H;
  592.   hiresHAMSDblKey *            = 00008808H;
  593.  
  594.  
  595. (* vga identifiers *)
  596.  
  597.   vgaMonitorID *               = 00031000H;
  598.  
  599.   vgaExtraLoresKey *           = 00031004H;
  600.   vgaLoresKey *                = 00039004H;
  601.   vgaProductKey *              = 00039024H;
  602.   vgaHAMKey *                  = 00031804H;
  603.   vgaExtraLoresLaceKey *       = 00031005H;
  604.   vgaLoresLaceKey *            = 00039005H;
  605.   vgaProductLaceKey *          = 00039025H;
  606.   vgaHAMLaceKey *              = 00031805H;
  607.   vgaExtraLoresDPFKey *        = 00031404H;
  608.   vgaLoresDPFKey *             = 00039404H;
  609.   vgaProductDPFKey *           = 00039424H;
  610.   vgaExtraLoresLaceDPFKey *    = 00031405H;
  611.   vgaLoresLaceDPFKey *         = 00039405H;
  612.   vgaProductLaceDPFKey *       = 00039425H;
  613.   vgaExtraLoresDPF2Key *       = 00031444H;
  614.   vgaLoresDPF2Key *            = 00039444H;
  615.   vgaProductDPF2Key *          = 00039464H;
  616.   vgaExtraLoresLaceDPF2Key *   = 00031445H;
  617.   vgaLoresLaceDPF2Key *        = 00039445H;
  618.   vgaProductLaceDPF2Key *      = 00039465H;
  619.   vgaExtraHalfBriteKey *       = 00031084H;
  620.   vgaExtraHalfBriteLaceKey *   = 00031085H;
  621. (* New for AA ChipSet (V39) *)
  622.   vgaProductHAMKey *           = 00039824H;
  623.   vgaLoresHAMKey *             = 00039804H;
  624.   vgaExtraLoresHAMKey *        = vgaHAMKey;
  625.   vgaProductHAMLaceKey *       = 00039825H;
  626.   vgaLoresHAMLaceKey *         = 00039805H;
  627.   vgaExtraLoresHAMLaceKey *    = vgaHAMLaceKey;
  628.   vgaExtraLoresEHBKey *        = vgaExtraHalfBriteKey;
  629.   vgaExtraLoresEHBLaceKey *    = vgaExtraHalfBriteLaceKey;
  630.   vgaLoresEHBKey *             = 00039084H;
  631.   vgaLoresEHBLaceKey *         = 00039085H;
  632.   vgaEHBKey *                  = 000390A4H;
  633.   vgaEHBLaceKey *              = 000390A5H;
  634. (* These ModeIDs are the scandoubled equivalents of the above, with the
  635.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  636.  * dualplayfield.
  637.  *)
  638.   vgaExtraLoresDblKey *        = 00031000H;
  639.   vgaLoresDblKey *             = 00039000H;
  640.   vgaProductDblKey *           = 00039020H;
  641.   vgaExtraLoresHAMDblKey *     = 00031800H;
  642.   vgaLoresHAMDblKey *          = 00039800H;
  643.   vgaProductHAMDblKey *        = 00039820H;
  644.   vgaExtraLoresEHBDblKey *     = 00031080H;
  645.   vgaLoresEHBDblKey *          = 00039080H;
  646.   vgaProductEHBDblKey *        = 000390A0H;
  647.  
  648. (* a2024 identifiers *)
  649.  
  650.   a2024MonitorID *             = 00041000H;
  651.  
  652.   a2024tenHertzKey *           = 00041000H;
  653.   a2024fifteenHertzKey *       = 00049000H;
  654.  
  655. (* prototype identifiers *)
  656.  
  657.   protoMonitorID *             = 00051000H;
  658.  
  659. (* These monitors and modes were added for the V38 release. *)
  660.  
  661.   euro72MonitorId *            = 000061000H;
  662.  
  663.   euro72ExtraLoresKey *        = 000061004H;
  664.   euro72LoresKey *             = 000069004H;
  665.   euro72ProductKey *           = 000069024H;
  666.   euro72HAMKey *               = 000061804H;
  667.   euro72ExtraLoresLaceKey *    = 000061005H;
  668.   euro72LoresLaceKey *         = 000069005H;
  669.   euro72ProductLaceKey *       = 000069025H;
  670.   euro72HAMLaceKey *           = 000061805H;
  671.   euro72ExtraLoresDPFKey *     = 000061404H;
  672.   euro72LoresDPFKey *          = 000069404H;
  673.   euro72ProductDPFKey *        = 000069424H;
  674.   euro72ExtraLoresLaceDPFKey * = 000061405H;
  675.   euro72LoresLaceDPFKey *      = 000069405H;
  676.   euro72ProductLaceDPFKey *    = 000069425H;
  677.   euro72ExtraLoresDPF2Key *    = 000061444H;
  678.   euro72LoresDPF2Key *         = 000069444H;
  679.   euro72ProductDPF2Key *       = 000069464H;
  680.   euro72ExtraLoresLaceDPF2Key * = 000061445H;
  681.   euro72LoresLaceDPF2Key *     = 000069445H;
  682.   euro72ProductLaceDPF2Key *   = 000069465H;
  683.   euro72ExtraHalfBriteKey *    = 000061084H;
  684.   euro72ExtraHalfBriteLaceKey * = 000061085H;
  685. (* New AA modes (V39) *)
  686.   euro72ProductHAMKey *        = 000069824H;
  687.   euro72ProductHAMLaceKey *    = 000069825H;
  688.   euro72LoresHAMKey *          = 000069804H;
  689.   euro72LoresHAMLaceKey *      = 000069805H;
  690.   euro72ExtraLoresHAMKey *     = euro72HAMKey;
  691.   euro72ExtraLoresHAMLaceKey * = euro72HAMLaceKey;
  692.   euro72ExtraLoresEHBKey *     = euro72ExtraHalfBriteKey;
  693.   euro72ExtraLoresEHBLaceKey * = euro72ExtraHalfBriteLaceKey;
  694.   euro72LoresEHBKey *          = 000069084H;
  695.   euro72LoresEHBLaceKey *      = 000069085H;
  696.   euro72EHBKey *               = 0000690A4H;
  697.   euro72EHBLaceKey *           = 0000690A5H;
  698. (* These ModeIDs are the scandoubled equivalents of the above, with the
  699.  * exception of the DualPlayfield modes, as AA does not allow for scandoubling
  700.  * dualplayfield.
  701.  *)
  702.   euro72ExtraLoresDblKey *     = 000061000H;
  703.   euro72LoresDblKey *          = 000069000H;
  704.   euro72ProductDblKey *        = 000069020H;
  705.   euro72ExtraLoresHAMDblKey *  = 000061800H;
  706.   euro72LoresHAMDblKey *       = 000069800H;
  707.   euro72ProductHAMDblKey *     = 000069820H;
  708.   euro72ExtraLoresEHBDblKey *  = 000061080H;
  709.   euro72LoresEHBDblKey *       = 000069080H;
  710.   euro72ProductEHBDblKey *     = 0000690A0H;
  711.  
  712.  
  713.   euro36MonitorId *            = 000071000H;
  714.  
  715. (* Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
  716.  * For example, Euro36 SuperHires is
  717.  * (EURO36_MONITOR_ID | SUPER_KEY)
  718.  *)
  719.  
  720.   super72MonitorId *           = 000081000H;
  721.  
  722. (* Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
  723.  * For example, Super72 SuperHiresLace (800x600) is
  724.  * (SUPER72_MONITOR_ID | SUPER_LACE_KEY).
  725.  * The following scandoubled Modes are the exception:
  726.  *)
  727.   super72LoresDblKey *         = 000081008H;
  728.   super72HiresDblKey *         = 000089008H;
  729.   super72SuperDblKey *         = 000089028H;
  730.   super72LoresHAMDblKey *      = 000081808H;
  731.   super72HiresHAMDblKey *      = 000089808H;
  732.   super72SuperHAMDblKey *      = 000089828H;
  733.   super72LoresEHBDblKey *      = 000081088H;
  734.   super72HiresEHBDblKey *      = 000089088H;
  735.   super72SuperEHBDblKey *      = 0000890A8H;
  736.  
  737.  
  738. (* These monitors and modes were added for the V39 release. *)
  739.  
  740.   dblNTSCMonitorId *           = 000091000H;
  741.  
  742.   dblNTSCLoresKey *            = 000091000H;
  743.   dblNTSCLoresffKey *          = 000091004H;
  744.   dblNTSCLoresHAMKey *         = 000091800H;
  745.   dblNTSCLoresHAMFFKey *       = 000091804H;
  746.   dblNTSCLoresEHBKey *         = 000091080H;
  747.   dblNTSCLoresEHBFFKey *       = 000091084H;
  748.   dblNTSCLoresLaceKey *        = 000091005H;
  749.   dblNTSCLoresHAMLaceKey *     = 000091805H;
  750.   dblNTSCLoresEHBLaceKey *     = 000091085H;
  751.   dblNTSCLoresDPFKey *         = 000091400H;
  752.   dblNTSCLoresDPFFFKey *       = 000091404H;
  753.   dblNTSCLoresDPFLaceKey *     = 000091405H;
  754.   dblNTSCLoresDPF2Key *        = 000091440H;
  755.   dblNTSCLoresDPF2FFKey *      = 000091444H;
  756.   dblNTSCLoresDPF2LaceKey *    = 000091445H;
  757.   dblNTSCHiresKey *            = 000099000H;
  758.   dblNTSCHiresFFKey *          = 000099004H;
  759.   dblNTSCHiresHAMKey *         = 000099800H;
  760.   dblNTSCHiresHAMFFKey *       = 000099804H;
  761.   dblNTSCHiresLaceKey *        = 000099005H;
  762.   dblNTSCHiresHAMLaceKey *     = 000099805H;
  763.   dblNTSCHiresEHBKey *         = 000099080H;
  764.   dblNTSCHiresEHBFFKey *       = 000099084H;
  765.   dblNTSCHiresEHBLaceKey *     = 000099085H;
  766.   dblNTSCHiresDPFKey *         = 000099400H;
  767.   dblNTSCHiresDPFFFKey *       = 000099404H;
  768.   dblNTSCHiresDPFLaceKey *     = 000099405H;
  769.   dblNTSCHiresDPF2Key *        = 000099440H;
  770.   dblNTSCHiresDPF2FFKey *      = 000099444H;
  771.   dblNTSCHiresDPF2LaceKey *    = 000099445H;
  772.   dblNTSCExtraLoresKey *       = 000091200H;
  773.   dblNTSCExtraLoresHAMKey *    = 000091A00H;
  774.   dblNTSCExtraLoresEHBKey *    = 000091280H;
  775.   dblNTSCExtraLoresDPFKey *    = 000091600H;
  776.   dblNTSCExtraLoresDPF2Key *   = 000091640H;
  777.   dblNTSCExtraLoresFFKey *     = 000091204H;
  778.   dblNTSCExtraLoresHAMFFKey *  = 000091A04H;
  779.   dblNTSCExtraLoresEHBFFKey *  = 000091284H;
  780.   dblNTSCExtraLoresDPFFFKey *  = 000091604H;
  781.   dblNTSCExtraLoresDPF2FFKey * = 000091644H;
  782.   dblNTSCExtraLoresLaceKey *   = 000091205H;
  783.   dblNTSCExtraLoresHAMLaceKey * = 000091A05H;
  784.   dblNTSCExtraLoresEHBLaceKey * = 000091285H;
  785.   dblNTSCExtraLoresDPFLaceKey * = 000091605H;
  786.   dblNTSCExtraLoresDPF2LaceKey * = 000091645H;
  787.  
  788.   dblPALMonitorId *            = 0000A1000H;
  789.  
  790.   dblPALLoresKey *             = 0000A1000H;
  791.   dblPALLoresFFKey *           = 0000A1004H;
  792.   dblPALLoresHAMKey *          = 0000A1800H;
  793.   dblPALLoresHAMFFKey *        = 0000A1804H;
  794.   dblPALLoresEHBKey *          = 0000A1080H;
  795.   dblPALLoresEHBFFKey *        = 0000A1084H;
  796.   dblPALLoresLaceKey *         = 0000A1005H;
  797.   dblPALLoresHAMLaceKey *      = 0000A1805H;
  798.   dblPALLoresEHBLaceKey *      = 0000A1085H;
  799.   dblPALLoresDPFKey *          = 0000A1400H;
  800.   dblPALLoresDPFFFKey *        = 0000A1404H;
  801.   dblPALLoresDPFLaceKey *      = 0000A1405H;
  802.   dblPALLoresDPF2Key *         = 0000A1440H;
  803.   dblPALLoresDPF2FFKey *       = 0000A1444H;
  804.   dblPALLoresDPF2LaceKey *     = 0000A1445H;
  805.   dblPALHiresKey *             = 0000A9000H;
  806.   dblPALHiresFFKey *           = 0000A9004H;
  807.   dblPALHiresHAMKey *          = 0000A9800H;
  808.   dblPALHiresHAMFFKey *        = 0000A9804H;
  809.   dblPALHiresLaceKey *         = 0000A9005H;
  810.   dblPALHiresHAMLaceKey *      = 0000A9805H;
  811.   dblPALHiresEHBKey *          = 0000A9080H;
  812.   dblPALHiresEHBFFKey *        = 0000A9084H;
  813.   dblPALHiresEHBLaceKey *      = 0000A9085H;
  814.   dblPALHiresDPFKey *          = 0000A9400H;
  815.   dblPALHiresDPFFFKey *        = 0000A9404H;
  816.   dblPALHiresDPFLaceKey *      = 0000A9405H;
  817.   dblPALHiresDPF2Key *         = 0000A9440H;
  818.   dblPALHiresDPF2FFKey *       = 0000A9444H;
  819.   dblPALHiresDPF2LaceKey *     = 0000A9445H;
  820.   dblPALExtraLoresKey *        = 0000A1200H;
  821.   dblPALExtraLoresHAMKey *     = 0000A1A00H;
  822.   dblPALExtraLoresEHBKey *     = 0000A1280H;
  823.   dblPALExtraLoresDPFKey *     = 0000A1600H;
  824.   dblPALExtraLoresDPF2Key *    = 0000A1640H;
  825.   dblPALExtraLoresFFKey *      = 0000A1204H;
  826.   dblPALExtraLoresHAMFFKey *   = 0000A1A04H;
  827.   dblPALExtraLoresEHBFFKey *   = 0000A1284H;
  828.   dblPALExtraLoresDPFFFKey *   = 0000A1604H;
  829.   dblPALExtraLoresDPF2FFKey *  = 0000A1644H;
  830.   dblPALExtraLoresLaceKey *    = 0000A1205H;
  831.   dblPALExtraLoresHAMLaceKey * = 0000A1A05H;
  832.   dblPALExtraLoresEHBLaceKey * = 0000A1285H;
  833.   dblPALExtraLoresDPFLaceKey * = 0000A1605H;
  834.   dblPALExtraLoresDPF2LaceKey * = 0000A1645H;
  835.  
  836.  
  837. (* Use these tags for passing to BestModeID() (V39) *)
  838.  
  839.   specialFlags * = {isDualPF, isPF2Pri, isHAM, isExtraHalfBrite};
  840.  
  841.   bidTagDipfMustHave *         = 080000001H;             (* mask of the DIPF_ flags the ModeID must have *)
  842.                                 (* Default - NULL *)
  843.   bidTagDipfMustNotHave *      = 080000002H;             (* mask of the DIPF_ flags the ModeID must not have *)
  844.                                 (* Default - SPECIAL_FLAGS *)
  845.   bidTagViewPort *             = 080000003H;                  (* ViewPort for which a ModeID is sought. *)
  846.                                 (* Default - NULL *)
  847.   bidTagNominalWidth *         = 080000004H;              (*  together make the aspect ratio and *)
  848.   bidTagNominalHeight *        = 080000005H;             (* / override the vp->Width/Height. *)
  849.                                 (* Default - SourceID NominalDimensionInfo,
  850.                                  * or vp->DWidth/Height, or (640 * 200),
  851.                                  * in that preferred order.
  852.                                  *)
  853.   bidTagDesiredWidth *         = 080000006H;              (*  Nominal Width and Height of the *)
  854.   bidTagDesiredHeight *        = 080000007H;             (* / returned ModeID. *)
  855.                                 (* Default - same as Nominal *)
  856.   bidTagDepth *                = 080000008H;                    (* ModeID must support this depth. *)
  857.                                 (* Default - vp->RasInfo->BitMap->Depth or 1 *)
  858.   bidTagMonitorID *            = 080000009H;                  (* ModeID must use this monitor. *)
  859.                                 (* Default - use best monitor available *)
  860.   bidTagSourceID *             = 08000000AH;                   (* instead of a ViewPort. *)
  861.                                 (* Default - VPModeID(vp) if BID_TAG_ViewPort is
  862.                                  * specified, else leave the DIPFMustHave and
  863.                                  * DIPFMustNotHave values untouched.
  864.                                  *)
  865.   bidTagRedBits *              = 08000000BH;                   (*                             *)
  866.   bidTagBlueBits *             = 08000000CH;                  (* } Match up from the database *)
  867.   bidTagGreenBits *            = 08000000DH;                 (* /                            *)
  868.                                 (* Default - 4 *)
  869.   bidTagGfxPrivate *           = 08000000EH;                (* Private *)
  870.  
  871.  
  872. (*
  873. **      $VER: gels.h 39.0 (21.8.91)
  874. **
  875. **      definitions for AMIGA GELS (Graphics Elements)
  876. *)
  877.  
  878.  
  879. CONST
  880.  
  881. (* VSprite flags *)
  882. (* user-set VSprite flags: *)
  883.   sUserFlags *  = {0 .. 7};  (* mask of all user-settable VSprite-flags *)
  884.   vSprite *     = 0;         (* set if VSprite, clear if Bob *)
  885.   saveBack *    = 1;         (* set if background is to be saved/restored *)
  886.   overlay *     = 2;         (* set to mask image of Bob onto background *)
  887.   mustDraw *    = 3;         (* set if VSprite absolutely must be drawn *)
  888. (* system-set VSprite flags: *)
  889.   backSaved *   = 8;      (* this Bob's background has been saved *)
  890.   bobUpdate *   = 9;      (* temporary flag, useless to outside world *)
  891.   gelGone *     = 10;     (* set if gel is completely clipped (offscreen) *)
  892.   vsOverflow *  = 11;     (* VSprite overflow (if MUSTDRAW set we draw!) *)
  893.  
  894. (* Bob flags *)
  895. (* these are the user flag bits *)
  896.   bUserFlags *   = {0 .. 7}; (* mask of all user-settable Bob-flags *)
  897.   saveBob *      = 0;        (* set to not erase Bob *)
  898.   bobIsComp *    = 1;        (* set to identify Bob as AnimComp *)
  899. (* these are the system flag bits *)
  900.   bWaiting *     = 8;        (* set while Bob is waiting on 'after' *)
  901.   bDrawn *       = 9;        (* set when Bob is drawn this DrawG pass *)
  902.   bobsAway *     = 10;       (* set to initiate removal of Bob *)
  903.   bobNix *       = 11;       (* set when Bob is completely removed *)
  904.   savePreserve * = 12;       (* for back-restore during double-buffer *)
  905.   outStep *      = 13;       (* for double-clearing if double-buffer *)
  906.  
  907. (* defines for the animation procedures *)
  908.   anFracSize *  = 6;
  909.   animHalf *    = 0020H;
  910.   ringTrigger * = 0001H;
  911.  
  912.  
  913. TYPE
  914.  
  915. (* UserStuff definitions
  916.  *  the user can define these to be a single variable or a sub-structure
  917.  *  if undefined by the user, the system turns these into innocuous variables
  918.  *  see the manual for a thorough definition of the UserStuff definitions
  919.  *
  920. *)
  921.  
  922.   (* VSprite user stuff *)
  923.   VUserStuff * = INTEGER;
  924.  
  925.   (* Bob user stuff *)
  926.   BUserStuff * = INTEGER;
  927.  
  928.   (* AnimOb user stuff *)
  929.   AUserStuff * = INTEGER;
  930.  
  931.  
  932. (********************** * GEL STRUCTURES** ******************************** *)
  933.  
  934.   VSprite * = RECORD
  935. (* --------------------- SYSTEM VARIABLES ------------------------------- *)
  936. (* GEL linked list forward/backward pointers sorted by y,x value *)
  937.     nextVSprite * : VSpritePtr;
  938.     prevVSprite * : VSpritePtr;
  939.  
  940. (* GEL draw list constructed in the order the Bobs are actually drawn, then
  941.  *  list is copied to clear list
  942.  *  must be here in VSprite for system boundary detection
  943. *)
  944.     drawPath * : VSpritePtr;     (* pointer of overlay drawing *)
  945.     clearPath * : VSpritePtr;    (* pointer for overlay clearing *)
  946.  
  947. (* the VSprite positions are defined in (y,x) order to make sorting
  948.  *  sorting easier, since (y,x) as a long integer
  949. *)
  950.     oldY *, oldX * : INTEGER;          (* previous position *)
  951.  
  952. (* --------------------- COMMON VARIABLES --------------------------------- *)
  953.     flags * : s.SET16;       (* VSprite flags *)
  954.  
  955.  
  956. (* --------------------- USER VARIABLES ----------------------------------- *)
  957. (* the VSprite positions are defined in (y,x) order to make sorting
  958.  *  sorting easier, since (y,x) as a long integer
  959.  *)
  960.     y *, x * : INTEGER;                (* screen position *)
  961.  
  962.     height * : INTEGER;
  963.     width * : INTEGER;       (* number of words per row of image data *)
  964.     depth * : INTEGER;       (* number of planes of data *)
  965.  
  966.     meMask * : s.SET16;              (* which types can collide with this VSprite *)
  967.     hitMask * : s.SET16;             (* which types this VSprite can collide with *)
  968.  
  969.     imageData * : e.APTR;          (* pointer to VSprite image *)
  970.  
  971. (* borderLine is the one-dimensional logical OR of all
  972.  *  the VSprite bits, used for fast collision detection of edge
  973.  *)
  974.     borderLine * : e.APTR;         (* logical OR of all VSprite bits *)
  975.     collMask * : e.APTR;           (* similar to above except this is a matrix *)
  976.  
  977. (* pointer to this VSprite's color definitions (not used by Bobs) *)
  978.     sprColors * : e.APTR;
  979.  
  980.     vsBob * : BobPtr;        (* points home if this VSprite is part of
  981.                                    a Bob *)
  982.  
  983. (* planePick flag:  set bit selects a plane from image, clear bit selects
  984.  *  use of shadow mask for that plane
  985.  * OnOff flag: if using shadow mask to fill plane, this bit (corresponding
  986.  *  to bit in planePick) describes whether to fill with 0's or 1's
  987.  * There are two uses for these flags:
  988.  *      - if this is the VSprite of a Bob, these flags describe how the Bob
  989.  *        is to be drawn into memory
  990.  *      - if this is a simple VSprite and the user intends on setting the
  991.  *        MUSTDRAW flag of the VSprite, these flags must be set too to describe
  992.  *        which color registers the user wants for the image
  993.  *)
  994.     planePick * : s.SET8;
  995.     planeOnOff * : s.SET8;
  996.  
  997.     vUserExt * : VUserStuff;      (* user definable:  see note above *)
  998.   END; (* VSprite *)
  999.  
  1000.  
  1001.   Bob * = RECORD
  1002. (* blitter-objects *)
  1003. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1004.  
  1005. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1006.     flags * : s.SET16;(* general purpose flags (see definitions below) *)
  1007.  
  1008. (* --------------------- USER VARIABLES ----------------------------------- *)
  1009.     saveBuffer * : e.APTR;   (* pointer to the buffer for background save *)
  1010.  
  1011. (* used by Bobs for "cookie-cutting" and multi-plane masking *)
  1012.     imageShadow * : e.APTR;
  1013.  
  1014. (* pointer to BOBs for sequenced drawing of Bobs
  1015.  *  for correct overlaying of multiple component animations
  1016.  *)
  1017.     before * : BobPtr; (* draw this Bob before Bob pointed to by before *)
  1018.     after * : BobPtr;  (* draw this Bob after Bob pointed to by after *)
  1019.  
  1020.     bobVSprite * : VSpritePtr;   (* this Bob's VSprite definition *)
  1021.  
  1022.     bobComp * : AnimCompPtr;      (* pointer to this Bob's AnimComp def *)
  1023.  
  1024.     dBuffer * : DBufPacketPtr;     (* pointer to this Bob's dBuf packet *)
  1025.  
  1026.     bUserExt * : BUserStuff;            (* Bob user extension *)
  1027. END; (* Bob *)
  1028.  
  1029.   AnimComp * = RECORD
  1030. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1031.  
  1032. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1033.     flags * : s.SET16;            (* AnimComp flags for system & user *)
  1034.  
  1035. (* timer defines how long to keep this component active:
  1036.  *  if set non-zero, timer decrements to zero then switches to nextSeq
  1037.  *  if set to zero, AnimComp never switches
  1038.  *)
  1039.     timer * : INTEGER;
  1040.  
  1041. (* --------------------- USER VARIABLES ----------------------------------- *)
  1042. (* initial value for timer when the AnimComp is activated by the system *)
  1043.     timeSet * : INTEGER;
  1044.  
  1045. (* pointer to next and previous components of animation object *)
  1046.     nextComp * : AnimCompPtr;
  1047.     prevComp * : AnimCompPtr;
  1048.  
  1049. (* pointer to component component definition of next image in sequence *)
  1050.     nextSeq * : AnimCompPtr;
  1051.     prevSeq * : AnimCompPtr;
  1052.  
  1053.     animCRoutine * : e.PROC; (* address of special animation procedure *)
  1054.  
  1055.     yTrans * : INTEGER;     (* initial y translation (if this is a component) *)
  1056.     xTrans * : INTEGER;     (* initial x translation (if this is a component) *)
  1057.  
  1058.     headOb * : AnimObPtr;
  1059.  
  1060.     animBob * : BobPtr;
  1061.   END; (* AnimComp *)
  1062.  
  1063.  
  1064.   AnimOb * = RECORD
  1065. (* --------------------- SYSTEM VARIABLES --------------------------------- *)
  1066.     nextOb *, prevOb * : AnimObPtr;
  1067.  
  1068. (* number of calls to Animate this AnimOb has endured *)
  1069.     clock * : LONGINT;
  1070.  
  1071.     anOldY *, anOldX * : INTEGER;            (* old y,x coordinates *)
  1072.  
  1073. (* --------------------- COMMON VARIABLES --------------------------------- *)
  1074.     anY *, anX * : INTEGER;                  (* y,x coordinates of the AnimOb *)
  1075.  
  1076. (* --------------------- USER VARIABLES ----------------------------------- *)
  1077.     yVel *, xVel * : INTEGER;                (* velocities of this object *)
  1078.     yAccel *, xAccell * : INTEGER;            (* accelerations of this object *)
  1079.  
  1080.     ringYTrans *, ringXTrans * : INTEGER;    (* ring translation values *)
  1081.  
  1082.     animoRoutine * : e.PROC;         (* address of special animation
  1083.                                        procedure *)
  1084.  
  1085.     headComp * : AnimCompPtr;     (* pointer to first component *)
  1086.  
  1087.     aUserExt * : AUserStuff;            (* AnimOb user extension *)
  1088.   END; (* AnimOb *)
  1089.  
  1090.   DBufPacket * = RECORD
  1091.     bufY *, bufX * : INTEGER;                (* save the other buffers screen coordinates *)
  1092.     bufPath * : VSpritePtr;      (* carry the draw path over the gap *)
  1093.  
  1094. (* these pointers must be filled in by the user *)
  1095. (* pointer to other buffer's background save buffer *)
  1096.     bufBuffer * : e.APTR;
  1097.   END; (* DBufPacket *)
  1098.  
  1099.  
  1100.  
  1101. CONST
  1102.  
  1103. (*** ********************************************************************** *)
  1104.  
  1105. (* these are GEL functions that are currently simple enough to exist as a
  1106.  *  definition.  It should not be assumed that this will always be the case
  1107.  *)
  1108.  
  1109. (*
  1110. #define InitAnimate(animKey) {*(animKey) = NULL;}
  1111. #define RemBob(b) {(b)->Flags |= BOBSAWAY;}
  1112. *)
  1113.  
  1114. (*** ********************************************************************** *)
  1115.  
  1116.   b2Norm *      = 0;
  1117.   b2Swap *      = 1;
  1118.   b2Bobber *    = 2;
  1119.  
  1120. (*** ********************************************************************** *)
  1121.  
  1122. TYPE
  1123.  
  1124.   CollTable * = RECORD
  1125.     collPtrs * : ARRAY 16 OF e.APTR;
  1126.   END; (* CollTable *)
  1127.  
  1128.  
  1129. (*
  1130. **      $VER: collide.h 37.0 (7.1.91)
  1131. **
  1132. **      definitions for collision detection and control
  1133. *)
  1134.  
  1135.  
  1136. CONST
  1137.  
  1138. (* These bit descriptors are used by the GEL collide routines.
  1139.  *  These bits are set in the hitMask and meMask variables of
  1140.  *  a GEL to describe whether or not these types of collisions
  1141.  *  can affect the GEL.  bndryHIT is described further below;
  1142.  *  this bit is permanently assigned as the boundary-hit flag.
  1143.  *  The other bit gelHIT is meant only as a default to cover
  1144.  *  any GEL hitting any other; the user may redefine this bit.
  1145.  *)
  1146.   borderHit * = 0;
  1147.  
  1148. (* These bit descriptors are used by the GEL boundry hit routines.
  1149.  *  When the user's boundry-hit routine is called (via the argument
  1150.  *  set by a call to SetCollision) the first argument passed to
  1151.  *  the user's routine is the address of the GEL involved in the
  1152.  *  boundry-hit, and the second argument has the appropriate bit(s)
  1153.  *  set to describe which boundry was surpassed
  1154.  *)
  1155.   topHit *    = 1;
  1156.   bottomHit * = 2;
  1157.   leftHit *   = 4;
  1158.   rightHit *  = 8;
  1159.  
  1160.  
  1161. (*
  1162. **      $VER: rastport.h 39.0 (21.8.91)
  1163. **
  1164. **      Graphics library rastport definitions
  1165. *)
  1166.  
  1167.  
  1168. TYPE
  1169.  
  1170.   AreaInfo * = RECORD
  1171.     vctrTbl * : e.APTR;         (* ptr to start of vector table *)
  1172.     vctrPtr * : e.APTR;         (* ptr to current vertex *)
  1173.     flagTbl * : e.APTR;         (* ptr to start of vector flag table *)
  1174.     flagPtr * : e.APTR;         (* ptrs to areafill flags *)
  1175.     count   * : INTEGER;        (* number of vertices in list *)
  1176.     maxCount * : INTEGER;         (* AreaMove/Draw will not allow Count>MaxCount *)
  1177.     firstX *, firstY * : INTEGER;    (* first point for this polygon *)
  1178.   END; (* AreaInfo *)
  1179.  
  1180.   TmpRas * = RECORD
  1181.     rasPtr * : e.APTR;
  1182.     size * : LONGINT;
  1183.   END; (* TmpRas *)
  1184.  
  1185.   GelsInfo * = RECORD
  1186.     sprRsrvd *       : SHORTINT; (* flag of which sprites to reserve from
  1187.                                     vsprite system *)
  1188.     flags *          : e.BYTE;   (* system use *)
  1189.     gelHead *,
  1190.     gelTail *        : VSpritePtr; (* dummy vSprites for list management *)
  1191.     (* pointer to array of 8 INTEGERS for sprite available lines *)
  1192.     nextLine *       : POINTER TO ARRAY 8 OF INTEGER;
  1193.     (* pointer to array of 8 pointers for color-last-assigned to vSprites *)
  1194.     lastColor *      : POINTER TO ARRAY 8 OF POINTER TO ARRAY 1 OF INTEGER;
  1195.     collHandler *    : CollTablePtr; (* addresses of collision routines *)
  1196.     leftmost *,
  1197.     rightmost *,
  1198.     topmost *,
  1199.     bottommost *     : INTEGER;
  1200.     firstBlissObj *,
  1201.     lastBlissObj *   : e.APTR;    (* system use only *)
  1202.   END; (* GelsInfo *)
  1203.  
  1204.   RastPort * = RECORD
  1205.     layer *        : LayerPtr;
  1206.     bitMap *       : BitMapPtr;
  1207.     areaPtrn *     : e.APTR;        (* ptr to areafill pattern *)
  1208.     tmpRas *       : TmpRasPtr;
  1209.     areaInfo *     : AreaInfoPtr;
  1210.     gelsInfo *     : GelsInfoPtr;
  1211.     mask *         : s.SET8;        (* write mask for this raster *)
  1212.     fgPen *        : SHORTINT;      (* foreground pen for this raster *)
  1213.     bgPen *        : SHORTINT;      (* background pen  *)
  1214.     aOlPen *       : SHORTINT;      (* areafill outline pen *)
  1215.     drawMode *     : s.SET8;        (* drawing mode for fill, lines, and text *)
  1216.     areaPtSz *     : SHORTINT;      (* 2^n words for areafill pattern *)
  1217.     linpatcnt *    : SHORTINT;      (* current line drawing pattern preshift *)
  1218.     dummy *        : SHORTINT;
  1219.     flags *        : s.SET16;       (* miscellaneous control bits *)
  1220.     linePtrn *     : e.UWORD;       (* 16 bits for textured lines *)
  1221.     x *, y *       : INTEGER;       (* current pen position *)
  1222.     minterms *     : ARRAY 8 OF e.UBYTE;
  1223.     penWidth *     : INTEGER;
  1224.     penHeight *    : INTEGER;
  1225.     font *         : TextFontPtr;   (* current font address *)
  1226.     algoStyle *    : s.SET8;        (* the algorithmically generated style *)
  1227.     txFlags *      : s.SET8;          (* text specific flags *)
  1228.     txHeight *     : e.UWORD;         (* text height *)
  1229.     txWidth *      : e.UWORD;          (* text nominal width *)
  1230.     txBaseline *   : e.UWORD;       (* text baseline *)
  1231.     txSpacing *    : INTEGER;        (* text spacing (per character) *)
  1232.     user *         : e.APTR;
  1233.     longreserved * : ARRAY 2 OF e.ULONG;
  1234.     wordreserved * : ARRAY 7 OF e.UWORD;  (* used to be a node *)
  1235.     reserved *     : ARRAY 8 OF e.UBYTE;      (* for future use *)
  1236.   END; (* RastPort *)
  1237.  
  1238. CONST
  1239.  
  1240. (* drawing modes *)
  1241.   jam1 *        = {};         (* jam 1 color into raster *)
  1242.   jam2 *        = {0};         (* jam 2 colors into raster *)
  1243.   complement *  = 1;         (* XOR bits into raster *)
  1244.   inversvid *   = 2;         (* inverse video for drawing modes *)
  1245.  
  1246. (* these are the flag bits for RastPort flags *)
  1247.   frstDot *    = 0;      (* draw the first dot of this line ? *)
  1248.   oneDot *     = 1;      (* use one dot mode for drawing lines *)
  1249.   dBuffer *    = 2;      (* flag set when RastPorts
  1250.                             are double-buffered *)
  1251.  
  1252.              (* only used for bobs *)
  1253.  
  1254.   areaOutline * = 3;      (* used by areafiller *)
  1255.   noCrossFill * = 5;      (* areafills have no crossovers *)
  1256.  
  1257. (* there is only one style of clipping: raster clipping *)
  1258. (* this preserves the continuity of jaggies regardless of clip window *)
  1259. (* When drawing into a RastPort, if the ptr to ClipRect is nil then there *)
  1260. (* is no clipping done, this is dangerous but useful for speed *)
  1261.  
  1262. (*
  1263. **      $VER: copper.h 39.10 (31.5.93)
  1264. **
  1265. **      graphics copper list intstruction definintions
  1266. *)
  1267.  
  1268.  
  1269. CONST
  1270.  
  1271.   move *  = 0;   (* pseude opcode for move #XXXX,dir *)
  1272.   wait *  = 1;   (* pseudo opcode for wait y,x *)
  1273.   next *  = 2;   (* continue processing with next buffer *)
  1274.   ntLof * = 15;  (* copper instruction only for short frames *)
  1275.   ntSht * = 14;  (* copper instruction only for long frames *)
  1276.   ntSys * = 13;  (* copper user instruction only *)
  1277.  
  1278. TYPE
  1279.  
  1280.   CopIns * = RECORD
  1281.     opCode * : INTEGER; (* 0 = move, 1 = wait *)
  1282.     destAddr *: INTEGER; (* vertical beam wait OR
  1283.                           * destination address of copper move *)
  1284.     destData *: INTEGER; (* beam wait position OR
  1285.                           * destination immediate data to send *)
  1286.   END; (* CopIns *)
  1287.  
  1288.   CopInsCL * = RECORD
  1289.     opCode * : INTEGER;
  1290.     nxtlist * : CopListDummyPtr;
  1291.   END; (* CopInsCL *)
  1292.  
  1293. TYPE
  1294.  
  1295.   Cprlist * = RECORD
  1296.     next *     : CprlistPtr;
  1297.     start *    : e.APTR;         (* start of copper list *)
  1298.     maxCount * : INTEGER;        (* number of long instructions *)
  1299.   END; (* Cprlist *)
  1300.  
  1301.   CopListDummy * = RECORD END;
  1302.  
  1303.   CopList * = RECORD (CopListDummy)
  1304.     next *      : CopListPtr;     (* next block for this copper list *)
  1305.     copList *   : CopListPtr;     (* system use *)
  1306.     viewPort *  : ViewPortPtr;    (* system use *)
  1307.     copIns *    : CopInsPtr;      (* start of this block *)
  1308.     copPtr *    : CopInsPtr;      (* intermediate ptr *)
  1309.     copLStart * : e.APTR;         (* mrgcop fills this in for Long Frame *)
  1310.     copSStart * : e.APTR;         (* mrgcop fills this in for Short Frame *)
  1311.     count *     : INTEGER;        (* intermediate counter *)
  1312.     maxCount *  : INTEGER;        (* max # of copins for this block *)
  1313.     dyOffset *  : INTEGER;        (* offset this copper list vertical waits *)
  1314.     slRepeat *  : INTEGER;
  1315.     flags *     : s.SET16;
  1316.   END; (* CopList *)
  1317.  
  1318.   CopList13 = RECORD (CopListDummy)
  1319.     next *      : CopList13Ptr;   (* next block for this copper list *)
  1320.     copList *   : CopList13Ptr;   (* system use *)
  1321.     viewPort *  : ViewPortPtr;    (* system use *)
  1322.     copIns *    : CopInsPtr;      (* start of this block *)
  1323.     copPtr *    : CopInsPtr;      (* intermediate ptr *)
  1324.     copLStart * : e.APTR;         (* mrgcop fills this in for Long Frame *)
  1325.     copSStart * : e.APTR;         (* mrgcop fills this in for Short Frame *)
  1326.     count *     : INTEGER;        (* intermediate counter *)
  1327.     maxCount *  : INTEGER;        (* max # of copins for this block *)
  1328.     dyOffset *  : INTEGER;        (* offset this copper list vertical waits *)
  1329.     cop2Start * : e.APTR;
  1330.     cop3Start * : e.APTR;
  1331.     cop4Start * : e.APTR;
  1332.     cop5Start * : e.APTR;
  1333.     slRepeat  * : INTEGER;
  1334.     flags     * : s.SET16;
  1335.   END; (* CopList13 *)
  1336.  
  1337.   UCopList * = RECORD
  1338.     next *         : UCopListPtr;
  1339.     firstCopList * : CopListDummyPtr; (* head node of this copper list *)
  1340.     copList *      : CopListDummyPtr; (* node in use *)
  1341.   END; (* UCopList *)
  1342.  
  1343. (* private graphics data structure *)
  1344.  
  1345.   CopinitPtr = POINTER TO Copinit;
  1346.   Copinit = RECORD
  1347.     vsyncHblank : ARRAY 2 OF e.UWORD;
  1348.     diagstrt    : ARRAY 12 OF e.UWORD; (* copper list for first bitplane *)
  1349.     fm0         : ARRAY 2 OF e.UWORD;
  1350.     diwstart    : ARRAY 10 OF e.UWORD;
  1351.     bplcon2     : ARRAY 2 OF e.UWORD;
  1352.     sprfix      : ARRAY 2*8 OF e.UWORD;
  1353.     sprstrtup   : ARRAY (2*8*2) OF e.UWORD;
  1354.     wait14      : ARRAY 2 OF e.UWORD;
  1355.     normHblank  : ARRAY 2 OF e.UWORD;
  1356.     jump        : ARRAY 2 OF e.UWORD;
  1357.     waitForever : ARRAY 6 OF e.UWORD;
  1358.     sprstop     : ARRAY 8 OF e.UWORD;
  1359.   END; (* Copinit *)
  1360.  
  1361.  
  1362. (*
  1363. **      $VER: view.h 39.34 (31.5.93)
  1364. **
  1365. **      graphics view/viewport definintions
  1366. *)
  1367.  
  1368. TYPE
  1369.  
  1370.   ViewPort * = RECORD
  1371.     next *             : ViewPortPtr;
  1372.     colorMap *         : ColorMapPtr;     (* table of colors for this viewport *)
  1373.                                           (* if this is nil, MakeVPort assumes default values *)
  1374.     dspIns *           : CopListDummyPtr; (* user by MakeView() *)
  1375.     sprIns *           : CopListDummyPtr; (* used by sprite stuff *)
  1376.     clrIns *           : CopListDummyPtr; (* used by sprite stuff *)
  1377.     uCopIns *          : UCopListPtr;     (* User copper list *)
  1378.     dWidth *, dHeight * : INTEGER;
  1379.     dxOffset *, dyOffset * : INTEGER;
  1380.     modes *            : s.SET16;
  1381.     spritePriorities * : SHORTINT;        (* used by makevp *)
  1382.     extendedModes *    : SHORTINT;
  1383.     rasInfo *          : RasInfoPtr;
  1384.   END; (* ViewPort *)
  1385.  
  1386.   View * = RECORD
  1387.     viewPort *   : ViewPortPtr;
  1388.     lofCprList * : CprlistPtr;        (* used for interlaced and noninterlaced *)
  1389.     shfCprList * : CprlistPtr;        (* only used during interlace *)
  1390.     dyOffset *, dxOffset * : INTEGER; (* for complete View positioning *)
  1391.                                       (* offsets are +- adjustments to standard #s *)
  1392.     modes *      : s.SET16;           (* such as INTERLACE, GENLOC *)
  1393.   END; (* View *)
  1394.  
  1395. (* these structures are obtained via GfxNew *)
  1396. (* and disposed by GfxFree *)
  1397.   ViewExtra * = RECORD (ExtendedNodeBase)
  1398.     n *       : ExtendedNode;
  1399.     view *    : ViewPtr;        (* backwards link *)
  1400.     monitor * : MonitorSpecPtr; (* monitors for this view *)
  1401.     topLine * :  e.UWORD;
  1402.   END; (* ViewExtra *)
  1403.  
  1404. (* this structure is obtained via GfxNew *)
  1405. (* and disposed by GfxFree *)
  1406.   ViewPortExtra * = RECORD (ExtendedNodeBase)
  1407.     n *           : ExtendedNode;
  1408.     viewPort *    : ViewPortPtr;        (* backwards link *)
  1409.     displayClip * : Rectangle;          (* makevp display clipping information *)
  1410.     (* These are added for V39 *)
  1411.     vecTable      : e.APTR;             (* Private *)
  1412.     driverData *  : ARRAY 2 OF e.APTR;
  1413.     flags *       : s.SET16;
  1414.     origin *      : ARRAY 2 OF Point;   (* First visible point relative to the DClip.
  1415.                                          * One for each possible playfield.
  1416.                                          *)
  1417.     cop1ptr       : e.ULONG;            (* private *)
  1418.     cop2ptr       : e.ULONG;            (* private *)
  1419.   END; (* ViewPortExtra *)
  1420.  
  1421. CONST
  1422.  
  1423. (* All these vpx flags are private *)
  1424.   vpxbFreeMe       = 0;
  1425.   vpxbLast         = 1;
  1426.   vpxbStraddles256 = 4;
  1427.   vpxbStraddles512 = 5;
  1428.  
  1429.   extendVStruct *  = 12;  (* unused bit in Modes field of View *)
  1430.  
  1431. (* VP_ fields internal only *)
  1432.   a2024 * = 6;
  1433.   tenhz * = 4;
  1434.  
  1435. (* defines used for Modes in IVPargs *)
  1436.  
  1437.   genLockVideo *   = 1;
  1438.   lace *           = 2;
  1439.   doubleScan *     = 3;
  1440.   superHires *     = 5;
  1441.   pfba *           = 6;
  1442.   extraHalfBrite * = 7;
  1443.   genlockAudio *   = 8;
  1444.   dualpf *         = 10;
  1445.   ham *            = 11;
  1446.   extendedMode *   = 12;
  1447.   vpHide *         = 13;
  1448.   sprites *        = 14;
  1449.   hires *          = 15;
  1450.  
  1451. TYPE
  1452.  
  1453. (* used by callers to and InitDspC() *)
  1454.  
  1455.   RasInfo * = RECORD
  1456.     next *   : RasInfoPtr;          (* used for dualpf *)
  1457.     bitMap * : BitMapPtr;
  1458.     rxOffset *, ryOffset : INTEGER; (* scroll offsets in this BitMap *)
  1459.   END; (* RasInfo *)
  1460.  
  1461.   ColorMap * = RECORD
  1462.     flags *             : s.SET8;
  1463.     type *              : SHORTINT;
  1464.     count *             : e.UWORD;
  1465.     colorTable *        : e.APTR;
  1466.     vpe *               : ViewPortExtraPtr;
  1467.     lowColorBits *      : e.APTR;
  1468.     transparencyPlane * : SHORTINT;
  1469.     spriteResolution *  : e.UBYTE;
  1470.     spriteResDefault *  : e.UBYTE;      (* what resolution you get when you have set SPRITERESN_DEFAULT *)
  1471.     auxFlags *          : s.SET8;
  1472.     vp *                : ViewPortPtr;
  1473.     normalDisplayInfo * : DisplayInfoPtr;
  1474.     coerceDisplayInfo * : DisplayInfoPtr;
  1475.     cmBatchItems *      : u.TagListPtr;
  1476.     vpModeID *          : e.ULONG;
  1477.     palExtra *          : PaletteExtraPtr;
  1478.     spriteBaseEven *    : e.UWORD;
  1479.     spriteBaseOdd *     : e.UWORD;
  1480.     bp0base *           : e.UWORD;
  1481.     bp1base *           : e.UWORD;
  1482.   END; (* ColorMap *)
  1483.  
  1484. CONST
  1485.  
  1486. (* if Type == 0 then ColorMap is V1.2/V1.3 compatible *)
  1487. (* if Type != 0 then ColorMap is V38       compatible *)
  1488. (* the system will never create other than V39 type colormaps when running V39 *)
  1489.  
  1490.   colorMapTypeV12 *      = 0;
  1491.   colorMapTypeV14 *      = 1;
  1492.   colorMapTypeV36 *      = colorMapTypeV14;    (* use this definition *)
  1493.   colorMapTypeV39 *      = 2;
  1494.  
  1495. (* Flags variable *)
  1496.   colorMapTransparency *   = 0;
  1497.   colorPlaneTransparency * = 1;
  1498.   borderBlanking *         = 2;
  1499.   borderNoTransparency *   = 3;
  1500.   videoControlBatch *      = 4;
  1501.   userCopperClip *         = 5;
  1502.   borderSprites *          = 6;
  1503.  
  1504.   cmfCmTrans * = 0;
  1505.   cmfCpTrans * = 1;
  1506.   cmfBrdrBlnk * = 2;
  1507.   cmfBrdnTran * = 3;
  1508.   cmfBrdrSprt * = 6;
  1509.  
  1510.   resnEcs * = 0;
  1511. (* ^140ns, except in 35ns viewport, where it is 70ns. *)
  1512.   resn140ns * = 1;
  1513.   resn70ns * = 2;
  1514.   resn35ns * = 3;
  1515.   resnDefault * = -1;
  1516.  
  1517. (* AuxFlags : *)
  1518.   fullPalette * = 0;
  1519.   noIntermedUpdate * = 1;
  1520.   noColorLoad * = 2;
  1521.   dualPFDisable * = 3;
  1522.  
  1523. TYPE
  1524.  
  1525.   (* structure may be extended so watch out! *)
  1526.  
  1527.   (* thanks for the warning :-) [fjc] *)
  1528.   PaletteExtraBase *= RECORD (e.SignalSemaphoreBase) END;
  1529.  
  1530.   PaletteExtra * = RECORD (PaletteExtraBase)
  1531.     semaphore *      :  e.SignalSemaphore;    (* shared semaphore for arbitration     *)
  1532.     firstFree        :  e.UWORD;              (* *private*                            *)
  1533.     nFree *          :  e.UWORD;              (* number of free colors                *)
  1534.     firstShared      :  e.UWORD;              (* *private*                            *)
  1535.     nShared          :  e.UWORD;              (* *private*                            *)
  1536.     refCnt           :  e.APTR;               (* *private*                            *)
  1537.     allocList        :  e.APTR;               (* *private*                            *)
  1538.     viewPort *       :  ViewPortPtr;          (* back pointer to viewport             *)
  1539.     sharableColors * :  e.UWORD;              (* the number of sharable colors.       *)
  1540.   END;
  1541.  
  1542. CONST
  1543.  
  1544. (* flags values for ObtainPen *)
  1545.  
  1546.   penbExclusive * = 0;
  1547.   penbNoSetColor * = 1;
  1548.  
  1549. (* precision values for ObtainBestPen : *)
  1550.  
  1551.   precisionExact * = -1;
  1552.   precisionImage * = 0;
  1553.   precisionIcon * = 16;
  1554.   precisionGui * = 32;
  1555.  
  1556.  
  1557. (* tags for ObtainBestPen: *)
  1558.   obpPrecision * = 084000000H;
  1559.   obpFailIfBad * = 084000001H;
  1560.  
  1561. (* From V39, MakeVPort() will return an error if there is not enough memory,
  1562.  * or the requested mode cannot be opened with the requested depth with the
  1563.  * given bitmap (for higher bandwidth alignments).
  1564.  *)
  1565.  
  1566.   mvpOk * = 0;                  (* you want to see this one *)
  1567.   mvpNoMem * = 1;               (* insufficient memory for intermediate workspace *)
  1568.   mvpNoVpe * = 2;               (* ViewPort does not have a ViewPortExtra, and
  1569.                                  * insufficient memory to allocate a temporary one.
  1570.                                  *)
  1571.   mvpNoDspins * = 3;            (* insufficient memory for intermidiate copper
  1572.                                  * instructions.
  1573.                                  *)
  1574.   mvpNoDisplay * = 4;           (* BitMap data is misaligned for this viewport's
  1575.                                  * mode and depth - see AllocBitMap().
  1576.                                  *)
  1577.   mvpOffBottom = 5;             (* PRIVATE - you will never see this. *)
  1578.  
  1579. (* From V39, MrgCop() will return an error if there is not enough memory,
  1580.  * or for some reason MrgCop() did not need to make any copper lists.
  1581.  *)
  1582.  
  1583.   mcopOk * = 0;                 (* you want to see this one *)
  1584.   mcopNoMem * = 1;              (* insufficient memory to allocate the system
  1585.                                  * copper lists.
  1586.                                  *)
  1587.   mcopNop * = 2;                (* MrgCop() did not merge any copper lists
  1588.                                  * (eg, no ViewPorts in the list, or all marked as
  1589.                                  * hidden).
  1590.                                  *)
  1591.  
  1592. TYPE
  1593.  
  1594.   DBufInfo  * = RECORD
  1595.     link1 *       : e.APTR;
  1596.     count1 *      : e.ULONG;
  1597.     safeMessage * : e.Message;  (* replied to when safe to write to old bitmap *)
  1598.     userData1 *   : e.APTR;     (* first user data *)
  1599.  
  1600.     link2 *       : e.APTR;
  1601.     count2 *      : e.ULONG;
  1602.     dispMessage * : e.Message;  (* replied to when new bitmap has been displayed at least
  1603.                                    once *)
  1604.     userData2 *   : e.APTR;     (* second user data *)
  1605.     matchLong *   : e.ULONG;
  1606.     copPtr1 *     : e.APTR;
  1607.     copPtr2 *     : e.APTR;
  1608.     copPtr3 *     : e.APTR;
  1609.     beamPos1 *    : e.UWORD;
  1610.     beamPos2 *    : e.UWORD;
  1611.   END;
  1612.  
  1613.  
  1614. (*
  1615. **      $VER: layers.h 39.4 (14.4.92)
  1616. **
  1617. **      graphics library layers definitions
  1618. *)
  1619.  
  1620.  
  1621. CONST
  1622.  
  1623.   layerSimple *           = 0;
  1624.   layerSmart *            = 1;
  1625.   layerSuper *            = 2;
  1626.   layerUpdating *         = 4;
  1627.   layerBackdrop *         = 6;
  1628.   layerRefresh *          = 7;
  1629.   layerIRefresh *         = 9;
  1630.   layerIRefresh2 *        = 10;
  1631.   layerClipRectsLost *    = 8;   (* during BeginUpdate *)
  1632.                                  (* or during layerop *)
  1633.                                  (* this happens if out of memory *)
  1634.   lmnRegion * = -1;              (* removed in V39 includes *)
  1635.  
  1636. TYPE
  1637.  
  1638.   LayerInfo * = RECORD
  1639.     topLayer *      : LayerPtr;
  1640.     lp              : LayerPtr;           (* !! Private !! *)
  1641.     obs *           : ClipRectPtr;
  1642.     freeClipRects   : ClipRectPtr;        (* !! Private !! *)
  1643.     privateReserve1 : LONGINT;            (* !! Private !! *)
  1644.     privateReserve2 : LONGINT;            (* !! Private !! *)
  1645.     lock            : e.SignalSemaphore;  (* !! Private !! *)
  1646.     gsHead          : e.MinList;          (* !! Private !! *)
  1647.     privateReserve3 : INTEGER;            (* !! Private !! *)
  1648.     privateReserve4 : e.APTR;             (* !! Private !! *)
  1649.     flags *         : s.SET16;
  1650.     count           : SHORTINT;           (* !! Private !! *)
  1651.     lockLayersCount : SHORTINT;           (* !! Private !! *)
  1652.     privateReserve5 : INTEGER;            (* !! Private !! *)
  1653.     blankHook       : e.APTR;             (* !! Private !! *)
  1654.     layerInfoExtra  : e.APTR;             (* !! Private !! *)
  1655.   END; (* LayerInfo *)
  1656.  
  1657. CONST
  1658.  
  1659.   newLayerInfoCalled * = 1;
  1660.   alertLayersNoMem   * = 83010000H;  (* removed in V39 includes *)
  1661.  
  1662. (*
  1663.  * layersNoBackfill is the value needed to get no backfill hook
  1664.  * layersBackfill is the value needed to get the default backfill hook
  1665.  *)
  1666.   noBackfill * = SYS.VAL (u.HookPtr, 1);
  1667.   backfill   * = NIL;
  1668.  
  1669.  
  1670. (*
  1671. **      $VER: clip.h 39.0 (2.12.91)
  1672. **
  1673. **      Graphics library clip definitions
  1674. *)
  1675.  
  1676.  
  1677. TYPE
  1678.  
  1679.   Layer * = RECORD
  1680.     front -, back -      : LayerPtr;
  1681.     clipRect -           : ClipRectPtr;  (* read by roms to find first cliprect *)
  1682.     rp -                 : RastPortPtr;
  1683.     bounds -             : Rectangle;
  1684.     reserved -           : ARRAY 4 OF e.UBYTE;
  1685.     priority -           : e.UWORD;   (* system use only *)
  1686.     flags -              : s.SET16;(* obscured ?, Virtual BitMap? *)
  1687.     superBitMap -        : BitMapPtr;
  1688.     superClipRect -      : ClipRectPtr;  (* super bitmap cliprects if VBitMap != 0 *)
  1689.                                          (* else damage cliprect list for refresh *)
  1690.     window -             : e.APTR;    (* reserved for user interface use *)
  1691.     scrollX -, scrollY - : INTEGER;
  1692.     cr -, cr2 -, crnew - : ClipRectPtr;  (* used by dedice *)
  1693.     superSaveClipRects - : ClipRectPtr;  (* preallocated cr's *)
  1694.     cliprects -          : ClipRectPtr;  (* system use during refresh *)
  1695.     layerInfo -          : LayerInfoPtr; (* points to head of the list *)
  1696.     lock -               : e.SignalSemaphore;
  1697.     backFill -           : u.HookPtr;
  1698.     reserved1 -          : e.ULONG;
  1699.     clipRegion -         : RegionPtr;
  1700.     saveClipRects -      : RegionPtr;    (* used to back out when in trouble *)
  1701.     width -, height -    : INTEGER;      (* system use *)
  1702.     reserved2 -          : ARRAY 18 OF e.UBYTE;
  1703.     (* this must stay here *)
  1704.     damageList -         : RegionPtr;    (* list of rectangles to refresh
  1705.                                             through *)
  1706.   END; (* Layer *)
  1707.  
  1708.   ClipRect * = RECORD
  1709.     next *     : ClipRectPtr;  (* roms used to find next ClipRect *)
  1710.     prev *     : ClipRectPtr;  (* Temp use in layers (private) *)
  1711.     lobs *     : LayerPtr;     (* Private use for layers *)
  1712.     bitMap *   : BitMapPtr;    (* Bitmap for layers private use *)
  1713.     bounds *   : Rectangle;    (* bounds of cliprect *)
  1714.     p1 *, p2 * : ClipRectPtr;  (* system reserved *)
  1715.     reserved * : LONGINT;      (* system use (Layers private) *)
  1716.     flags *    : s.SET32;      (* Layers private field for cliprects *)
  1717.                                (* that layers allocates... *)
  1718.                                (* MUST be multiple of 8 bytes to buffer *)
  1719.   END; (* ClipRect *)
  1720.  
  1721. CONST
  1722.  
  1723. (* internal cliprect flags *)
  1724.   needsNoConcealedRasters = 1;
  1725.   needsNoLayerblitDamage  = 2;
  1726.  
  1727. (* defines for code values for getcode *)
  1728.   isLessX * = 1;
  1729.   isLessY * = 2;
  1730.   isGrtrX * = 4;
  1731.   isGrtrY * = 8;
  1732.  
  1733.  
  1734. (*
  1735. **      $VER: regions.h 39.0 (21.8.91)
  1736. **
  1737. **      Graphics region definitions
  1738. *)
  1739.  
  1740.  
  1741. TYPE
  1742.  
  1743.   RegionRectangle * = RECORD
  1744.     next *, prev * : RegionRectanglePtr;
  1745.     bounds *       : Rectangle;
  1746.   END; (* RegionRectangle *)
  1747.  
  1748.   Region * = RECORD (RectangleBase)
  1749.     bounds *          : Rectangle;
  1750.     regionRectangle * : RegionRectanglePtr;
  1751.   END; (* Region *)
  1752.  
  1753.  
  1754. (*
  1755. **      $VER: sprite.h 39.6 (16.6.92)
  1756. **
  1757. **      Graphics sprite definitions
  1758. *)
  1759.  
  1760. CONST
  1761.  
  1762.   spriteAttached * = 80H;
  1763.  
  1764. TYPE
  1765.  
  1766.   SimpleSpriteBase *= RECORD END;
  1767.  
  1768.   SimpleSprite * = RECORD (SimpleSpriteBase)
  1769.     posctldata * : e.APTR;
  1770.     height *     : e.UWORD;
  1771.     x *, y *     : e.UWORD;    (* current position *)
  1772.     num *        : e.UWORD;
  1773.   END; (* SimpleSprite *)
  1774.  
  1775.   ExtSprite * = RECORD (SimpleSpriteBase)
  1776.     simpleSprite * : SimpleSprite;    (* conventional simple sprite structure *)
  1777.     wordWidth *    : e.UWORD;         (* graphics use only, subject to change *)
  1778.     flags *        : s.SET16;         (* graphics use only, subject to change *)
  1779.   END;
  1780.  
  1781. CONST
  1782.  
  1783. (* tags for AllocSpriteData() *)
  1784.   spriteaWidth *         = 081000000H;
  1785.   spriteaXreplication *  = 081000002H;
  1786.   spriteaYreplication *  = 081000004H;
  1787.   spriteaOutputheight *  = 081000006H;
  1788.   spriteaAttached *      = 081000008H;
  1789.   spriteaOlddataformat * = 08100000AH; (* MUST pass in outputheight if using this tag *)
  1790.  
  1791. (* tags for GetExtSprite() *)
  1792.   gstagSpriteNum *       = 082000020H;
  1793.   gstagAttached *        = 082000022H;
  1794.   gstagSoftsprite *      = 082000024H;
  1795.  
  1796. (* tags valid for either GetExtSprite or ChangeExtSprite *)
  1797.   gstagScandoubled *     = 083000000H; (* request "NTSC-Like" height if possible. *)
  1798.  
  1799.  
  1800. (*
  1801. **      $VER: text.h 39.0 (21.8.91)
  1802. **
  1803. **      graphics library text structures
  1804. *)
  1805.  
  1806.  
  1807. CONST
  1808.  
  1809. (* ------ Font Styles ------------------------------------------------ *)
  1810.   normal *      = {};      (* normal text (no style bits set) *)
  1811.   normalFont *  = {};      (* prehistoric synonym             *)
  1812.   underlined *  = 0;       (* underlined (under baseline) *)
  1813.   bold *        = 1;       (* bold face text (ORed w/ shifted) *)
  1814.   italic *      = 2;       (* italic (slanted 1:2 right) *)
  1815.   extended *    = 3;       (* extended face (wider than normal) *)
  1816.  
  1817.   colorfont *   = 6;       (* this uses ColorTextFont structure *)
  1818.   tagged *      = 7;       (* the TextAttr is really an TTextAttr, *)
  1819.  
  1820. (* ------ Font Flags ------------------------------------------------- *)
  1821.   romFont *      = 0;     (* font is in rom *)
  1822.   diskFont *     = 1;     (* font is from diskfont.library *)
  1823.   revPath *      = 2;     (* designed path is reversed (e.g. left) *)
  1824.   tallDot *      = 3;     (* designed for hires non-interlaced *)
  1825.   wideDot *      = 4;     (* designed for lores interlaced *)
  1826.   proportional * = 5;     (* character sizes can vary from nominal *)
  1827.   designed *     = 6;     (* size explicitly designed, not constructed *)
  1828.                           (* note: if you do not set this bit in your *)
  1829.                           (* textattr, then a font may be constructed *)
  1830.                           (* for you by scaling an existing rom or disk *)
  1831.                           (* font (under V36 and above). *)
  1832.   (* bit 7 is always clear for fonts on the graphics font list *)
  1833.   removed *     = 7;      (* the font has been removed *)
  1834.  
  1835. TYPE
  1836.  
  1837. (****** TextAttr node, matches text attributes in RastPort **********)
  1838.   TextAttr * = RECORD
  1839.     name *  : e.LSTRPTR;         (* name of the font *)
  1840.     ySize * : e.UWORD;          (* height of the font *)
  1841.     style * : s.SET8;           (* intrinsic font style *)
  1842.     flags * : s.SET8;           (* font preferences and flags *)
  1843.   END; (* TextAttr *)
  1844.  
  1845.   TTextAttr * = RECORD
  1846.     name *  : e.LSTRPTR;        (* name of the font *)
  1847.     ySize * : e.UWORD;         (* height of the font *)
  1848.     style * : s.SET8;          (* intrinsic font style *)
  1849.     flags * : s.SET8;          (* font preferences and flags *)
  1850.     tags *  : u.TagListPtr;    (* extended attributes *)
  1851.   END; (* TTextAttr *)
  1852.  
  1853.  
  1854. CONST
  1855.  
  1856. (****** Text Tags ************************************************** *)
  1857.   deviceDPI * = u.user+1;    (* Tag value is Point union: *)
  1858.                              (* Hi word XDPI, Lo word YDPI *)
  1859.  
  1860.   maxFontMatchweight *      = 32767;   (* perfect match from WeighTAMatch *)
  1861.  
  1862.  
  1863. TYPE
  1864.  
  1865. (****** TextFonts node **********************************************)
  1866.  
  1867.   TextFontBase *= RECORD (e.MessageBase) END;
  1868.   TextFontBasePtr *= POINTER TO TextFontBase;
  1869.  
  1870.   TextFont * = RECORD (TextFontBase)
  1871.     message *   : e.Message;      (* reply message for font removal *)
  1872.                                   (* font name in LN        \    used in this *)
  1873.     ySize *     : e.UWORD;        (* font height            |    order to best *)
  1874.     style *     : s.SET8;         (* font style             |    match a font *)
  1875.     flags *     : s.SET8;         (* preferences and flags  /    request. *)
  1876.     xSize *     : e.UWORD;        (* nominal font width *)
  1877.     baseline *  : e.UWORD;        (* distance from the top of char to baseline *)
  1878.     boldSmear * : e.UWORD;        (* smear to affect a bold enhancement *)
  1879.  
  1880.     accessors * : e.UWORD;        (* access count *)
  1881.  
  1882.     loChar *    : CHAR;           (* the first character described here *)
  1883.     hiChar *    : CHAR;           (* the last character described here *)
  1884.     charData *  : e.APTR;         (* the bit character data *)
  1885.  
  1886.     modulo *    : e.UWORD;        (* the row modulo for the strike font data *)
  1887.     charLoc *   : e.APTR;         (* ptr to location data for the strike font *)
  1888.                                   (*   2 words: bit offset then size *)
  1889.     charSpace * : e.APTR;         (* ptr to words of proportional spacing data *)
  1890.     charKern *  : e.APTR;         (* ptr to words of kerning data *)
  1891.   END; (* TextFont *)
  1892.  
  1893.  
  1894. CONST
  1895.  
  1896. (* ----- TextFontExtension.flags0 (partial definition) ---------------------------- *)
  1897.   noRemFont *  = 0;       (* disallow RemFont for this font *)
  1898.  
  1899. TYPE
  1900.  
  1901.   TextFontExtension * = RECORD
  1902.     matchWord -     : e.UWORD;         (* a magic cookie for the extension *)
  1903.     flags0          : s.SET8;          (* (system private flags) *)
  1904.     flags1          : s.SET8;          (* (system private flags) *)
  1905.     backPtr -       : TextFontPtr;     (* validation of compilation *)
  1906.     origReplyPort - : e.MsgPortPtr;    (* original value in tfExtension *)
  1907.     tags -          : u.TagListPtr;    (* Text Tags for the font *)
  1908.     oFontPatchS     : e.APTR;          (* (system private use) *)
  1909.     oFontPatchK     : e.APTR;          (* (system private use) *)
  1910.     (* this space is reserved for future expansion *)
  1911.   END; (* TextFontExtension *)
  1912.  
  1913. CONST
  1914.  
  1915. (****** ColorTextFont node ******************************************)
  1916. (* ----- ctfFlags -------------------------------------------------- *)
  1917.   ctColorMask *    = {0..3};  (* mask to get to following color styles *)
  1918.   ctColorFont *    = 0;       (* color map contains designer's colors *)
  1919.   ctGreyFont *     = 1;       (* color map describes even-stepped *)
  1920.                               (* brightnesses from low to high *)
  1921.   ctAntiAlias *    = 2;       (* zero background thru fully saturated char *)
  1922.  
  1923.   ctMapColor *     = 0;       (* map ctfFgColor to the rpFgPen if it's *)
  1924.                               (* is a valid color within ctfLow..ctfHigh *)
  1925.  
  1926. TYPE
  1927.  
  1928. (*----- ColorFontColors --------------------------------------------*)
  1929.   ColorFontColors * = RECORD
  1930.     reserved *   : e.UWORD; (*  *must* be zero *)
  1931.     count *      : e.UWORD; (* number of entries in ColorTable *)
  1932.     colorTable * : e.APTR;  (* 4 bit per component color map packed xRGB *)
  1933.   END; (* ColorFontColors *)
  1934.  
  1935. (*----- ColorTextFont ----------------------------------------------*)
  1936.   ColorTextFont * = RECORD (TextFontBase)
  1937.     tf *          : TextFont;
  1938.     flags *       : s.SET16;  (* extended flags *)
  1939.     depth *       : SHORTINT; (* number of bit planes *)
  1940.     fgColor *     : SHORTINT; (* color that is remapped to FgPen *)
  1941.     low *         : SHORTINT; (* lowest color represented here *)
  1942.     high *        : SHORTINT; (* highest color represented here *)
  1943.     planePick *   : s.SET8;   (* PlanePick ala Images *)
  1944.     planeOnOff *  : s.SET8;   (* PlaneOnOff ala Images *)
  1945.     colorFontColors * : ColorFontColorsPtr; (* colors for font *)
  1946.     charData *    : ARRAY 8 OF e.APTR; (* pointers to bit planes ala tfCharData *)
  1947.   END; (* ColorTextFont *)
  1948.  
  1949. (****** Textextent node *********************************************)
  1950.   Textextent * = RECORD
  1951.     width *  : e.UWORD;   (* same as TextLength *)
  1952.     height * : e.UWORD;   (* same as tfYSize *)
  1953.     extent * : Rectangle; (* relative to CP *)
  1954.   END; (* Textextent *)
  1955.  
  1956.  
  1957. (*
  1958. **      $VER: videocontrol.h 39.8 (31.5.93)
  1959. **
  1960. **      definitions for videocontrol commands
  1961. *)
  1962.  
  1963.  
  1964. CONST
  1965.  
  1966.   vtagEndCM *             = 00000000H;
  1967.   vtagChromaKeyClr *      = 80000000H;
  1968.   vtagChromaKeySet *      = 80000001H;
  1969.   vtagBitPlaneKeyClr *    = 80000002H;
  1970.   vtagBitPlaneKeySet *    = 80000003H;
  1971.   vtagBorderBlankClr *    = 80000004H;
  1972.   vtagBorderBlankSet *    = 80000005H;
  1973.   vtagBorderNoTransClr *  = 80000006H;
  1974.   vtagBorderNoTransSet *  = 80000007H;
  1975.   vtagChromaPenClr *      = 80000008H;
  1976.   vtagChromaPenSet *      = 80000009H;
  1977.   vtagChromaPlaneSet *    = 8000000AH;
  1978.   vtagAttachCMSet *       = 8000000BH;
  1979.   vtagNextBufCM *         = 8000000CH;
  1980.   vtagBatchCMClr *        = 8000000DH;
  1981.   vtagBatchCMSet *        = 8000000EH;
  1982.   vtagNormalDispGet *     = 8000000FH;
  1983.   vtagNormalDispSet *     = 80000010H;
  1984.   vtagCoerceDispGet *     = 80000011H;
  1985.   vtagCoerceDispSet *     = 80000012H;
  1986.   vtagViewPortExtraGet *  = 80000013H;
  1987.   vtagViewPortExtraSet *  = 80000014H;
  1988.   vtagChromaKeyGet *      = 80000015H;
  1989.   vtagBitplaneKeyGet *    = 80000016H;
  1990.   vtagBorderBlankGet *    = 80000017H;
  1991.   vtagBorderNoTransGet *  = 80000018H;
  1992.   vtagChromaPenGet *      = 80000019H;
  1993.   vtagChromaPlaneGet *    = 8000001AH;
  1994.   vtagAttachCMGet *       = 8000001BH;
  1995.   vtagBatchCMGet *        = 8000001CH;
  1996.   vtagBatchItemsGet *     = 8000001DH;
  1997.   vtagBatchItemsSet *     = 8000001EH;
  1998.   vtagBatchItemsAdd *     = 8000001FH;
  1999.   vtagVPModeIDGet *       = 80000020H;
  2000.   vtagVPModeIDSet *       = 80000021H;
  2001.   vtagVPModeIDClr *       = 80000022H;
  2002.   vtagUserClipGet *       = 80000023H;
  2003.   vtagUserClipSet *       = 80000024H;
  2004.   vtagUserClipClr *       = 80000025H;
  2005.  
  2006. (* The following tags are V39 specific. They will be ignored (returing error -3) by
  2007.         earlier versions *)
  2008.   vtagPf1BaseGet *        = 080000026H;
  2009.   vtagPf2BaseGet *        = 080000027H;
  2010.   vtagSpEvenBaseGet *     = 080000028H;
  2011.   vtagSpOddBaseGet *      = 080000029H;
  2012.   vtagPf1BaseSet *        = 08000002AH;
  2013.   vtagPf2BaseSet *        = 08000002BH;
  2014.   vtagSpEvenBaseSet *     = 08000002CH;
  2015.   vtagSpOddBaseSet *      = 08000002DH;
  2016.   vtagBorderSpriteGet *   = 08000002EH;
  2017.   vtagBorderSpriteSet *   = 08000002FH;
  2018.   vtagBorderSpriteClr *   = 080000030H;
  2019.   vtagSpriteResnSet *     = 080000031H;
  2020.   vtagSpriteResnGet *     = 080000032H;
  2021.   vtagPf1ToSpritePriSet * = 080000033H;
  2022.   vtagPf1ToSpritePriGet * = 080000034H;
  2023.   vtagPf2ToSpritePriSet * = 080000035H;
  2024.   vtagPf2ToSpritePriGet * = 080000036H;
  2025.   vtagImmediate *         = 080000037H;
  2026.   vtagFullPaletteSet *    = 080000038H;
  2027.   vtagFullPaletteGet *    = 080000039H;
  2028.   vtagFullPaletteClr *    = 08000003AH;
  2029.   vtagDefSpriteResnSet *  = 08000003BH;
  2030.   vtagDefSpriteResnGet *  = 08000003CH;
  2031.  
  2032. (* all the following tags follow the new, rational standard for videocontrol tags:
  2033.  * VC_xxx,state         set the state of attribute 'xxx' to value 'state'
  2034.  * VC_xxx_QUERY,&var    get the state of attribute 'xxx' and store it into the longword
  2035.  *                      pointed to by &var.
  2036.  *
  2037.  * The following are new for V40:
  2038.  *)
  2039.  
  2040.   vcIntermediateCLUpdate *      = 080000080H;
  2041.         (* default=true. When set graphics will update the intermediate copper
  2042.          * lists on color changes, etc. When false, it won't, and will be faster.
  2043.          *)
  2044.   vcIntermediateCLUpdateQuery * = 080000081H;
  2045.  
  2046.   vcNoColorPaletteLoad *        = 080000082H;
  2047.         (* default = false. When set, graphics will only load color 0
  2048.          * for this ViewPort, and so the ViewPort's colors will come
  2049.          * from the previous ViewPort's.
  2050.          *
  2051.          * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
  2052.          *)
  2053.   vcNoColorPaletteLoadQuery *   = 080000083H;
  2054.  
  2055.   vcDualPFDisable *             = 080000084H;
  2056.         (* default = false. When this flag is set, the dual-pf bit
  2057.            in Dual-Playfield screens will be turned off. Even bitplanes
  2058.            will still come from the first BitMap and odd bitplanes
  2059.            from the second BitMap, and both R[xy]Offsets will be
  2060.            considered. This can be used (with appropriate palette
  2061.            selection) for cross-fades between differently scrolling
  2062.            images.
  2063.            When this flag is turned on, colors will be loaded for
  2064.            the viewport as if it were a single viewport of depth
  2065.            depth1+depth2 *)
  2066.   vcDualPFDisableQuery *        = 080000085H;
  2067.  
  2068.  
  2069. (*
  2070. **      $VER: graphint.h 39.0 (23.9.91)
  2071. **
  2072. **      structure used by AddTOFTask
  2073. *)
  2074.  
  2075.  
  2076. TYPE
  2077.  
  2078.   Isrvstr * = RECORD (e.NodeBase)
  2079.     node *  : e.Node;
  2080.     iptr *  : IsrvstrPtr;   (* passed to srvr by os *)
  2081.     code *  : e.PROC;
  2082.     ccode * : e.PROC;
  2083.     carg *  : LONGINT;
  2084.   END; (* Isrvstr *)
  2085.  
  2086.  
  2087. (*
  2088. **      $VER: scale.h 39.0 (21.8.91)
  2089. **
  2090. **      structure argument to BitMapScale()
  2091. *)
  2092.  
  2093.  
  2094. TYPE
  2095.  
  2096.   BitScaleArgs * = RECORD
  2097.     srcX *,        srcY *        : e.UWORD; (* source origin *)
  2098.     srcWidth *,    srcHeight *   : e.UWORD; (* source size *)
  2099.     xSrcFactor *,  ySrcFactor *  : e.UWORD; (* scale factor denominators *)
  2100.     destX *,       destY *       : e.UWORD; (* destination origin *)
  2101.     destWidth *,   destHeight *  : e.UWORD; (* destination size result *)
  2102.     xDestFactor *, yDestFactor * : e.UWORD; (* scale factor numerators *)
  2103.     srcBitMap *    : BitMapPtr;               (* source BitMap *)
  2104.     destBitMap *   : BitMapPtr;               (* destination BitMap *)
  2105.     flags *        : e.ULONG;                 (* reserved.  Must be zero! *)
  2106.     xdda *, ydda * : e.UWORD;                 (* reserved *)
  2107.     reserved1 *    : LONGINT;
  2108.     reserved2 *    : LONGINT;
  2109.   END; (* BitScaleArgs *)
  2110.  
  2111. (*
  2112. **      $VER: coerce.h 39.3 (15.2.93)
  2113. **
  2114. **      mode coercion definitions
  2115. *)
  2116.  
  2117. (* These flags are passed (in combination) to CoerceMode() to determine the
  2118.  * type of coercion required.
  2119.  *)
  2120.  
  2121. CONST
  2122.  
  2123. (* Ensure that the mode coerced to can display just as many colours as the
  2124.  * ViewPort being coerced.
  2125.  *)
  2126.   preserveColors * = 1;
  2127.  
  2128. (* Ensure that the mode coerced to is not interlaced. *)
  2129.   avoidFlicker * = 2;
  2130.  
  2131. (* Coercion should ignore monitor compatibility issues. *)
  2132.   ignoreMCompat * = 4;
  2133.  
  2134.  
  2135.   bidTagCoerce = 1;    (* Private *)
  2136.  
  2137. (*
  2138. **      $VER: rpattr.h 39.2 (31.5.93)
  2139. **
  2140. **      tag definitions for GetRPAttr, SetRPAttr
  2141. *)
  2142.  
  2143. CONST
  2144.  
  2145.   rpFont *       = 080000000H;  (* get/set font *)
  2146.   rpAPen *       = 080000002H;  (* get/set apen *)
  2147.   rpBPen *       = 080000003H;  (* get/set bpen *)
  2148.   rpDrMd *       = 080000004H;  (* get/set draw mode *)
  2149.   rpOutLinePen * = 080000005H;  (* get/set outline pen *)
  2150.   rpOutlinePen * = 080000005H;  (* get/set outline pen. corrected case. *)
  2151.   rpWriteMask *  = 080000006H;  (* get/set WriteMask *)
  2152.   rpMaxPen *     = 080000007H;  (* get/set maxpen *)
  2153.  
  2154.   rpDrawBounds * = 080000008H;  (* get only rastport draw bounds. pass &rect *)
  2155.  
  2156. (*
  2157. **      $VER: gfxbase.h 39.21 (21.4.93)
  2158. **
  2159. **      graphics base definitions
  2160. *)
  2161.  
  2162.  
  2163. TYPE
  2164.  
  2165.   GfxBasePtr * = POINTER TO GfxBase;
  2166.   GfxBase * = RECORD (e.LibraryBase)
  2167.     libNode *  : e.Library;
  2168.     actiView * : ViewPtr;
  2169.     copinit *  : CopinitPtr;           (* ptr to copper start up list *)
  2170.     cia *      : e.APTR;               (* for 8520 resource use *)
  2171.     blitter *  : e.APTR;               (* for future blitter resource use *)
  2172.     loFlist *  : e.APTR;
  2173.     shFlist *  : e.APTR;
  2174.     blthd *, blttl *     : h.BltnodePtr;
  2175.     bsblthd *, bsblttl * : h.BltnodePtr;
  2176.     vbsrv *, timsrv *, bltsrv * : e.Interrupt;
  2177.     textFonts * : e.List;
  2178.     defaultFont * : TextFontPtr;
  2179.     modes *    : s.SET16;              (* copy of current first bplcon0 *)
  2180.     vBlank *   : e.BYTE;
  2181.     debug *    : e.BYTE;
  2182.     beamSync * : INTEGER;
  2183.     systembplcon0 * : s.SET16;(* it is ored into each bplcon0 for display *)
  2184.     spriteReserved * : e.UBYTE;
  2185.     bytereserved * : e.UBYTE;
  2186.     flags * : s.SET16;
  2187.     blitLock * : INTEGER;
  2188.     blitNest * : INTEGER;
  2189.  
  2190.     blitWaitQ * : e.List;
  2191.     blitOwner * : e.TaskPtr;
  2192.     tofWaitQ *  : e.List;
  2193.     displayFlags * : s.SET16;          (* NTSC PAL GENLOC etc *)
  2194.                                        (* flags initialized at power on *)
  2195.     simpleSprites * : e.APTR;
  2196.     maxDisplayRow * : e.UWORD;          (* hardware stuff, do not use *)
  2197.     maxDisplayColumn * : e.UWORD;       (* hardware stuff, do not use *)
  2198.     normalDisplayRows * : e.UWORD;
  2199.     normalDisplayColumns * : e.UWORD;
  2200.     (* the following are for standard non interlace, 1/2 wb width *)
  2201.     normalDPMX * : e.UWORD;             (* Dots per meter on display *)
  2202.     normalDPMY * : e.UWORD;             (* Dots per meter on display *)
  2203.     lastChanceMemory * : e.SignalSemaphorePtr;
  2204.     lcMptr * : e.APTR;
  2205.     microsPerLine * : e.UWORD;          (* 256 time usec/line *)
  2206.     minDisplayColumn * : e.UWORD;
  2207.     chipRevBits0 * : s.SET8;
  2208.     memType * :  e.UBYTE;
  2209.     reserved * : ARRAY 4 OF e.UBYTE;
  2210.     monitorid * : e.UWORD;             (* normally null *)
  2211.     hedley * : ARRAY 8 OF e.ULONG;
  2212.     hedleySprites * : ARRAY 8 OF e.ULONG;     (* sprite ptrs for intuition mouse *)
  2213.     hedleySprites1 * : ARRAY 8 OF e.ULONG;            (* sprite ptrs for intuition mouse *)
  2214.     hedleyCount * : INTEGER;
  2215.     hedleyFlags * : s.SET16;
  2216.     hedleyTmp * : INTEGER;
  2217.     hashTable * : e.APTR;
  2218.     currentTotRows * : e.UWORD;
  2219.     currentTotCclks * : e.UWORD;
  2220.     hedleyHint * : e.UBYTE;
  2221.     hedleyHint2 * : e.UBYTE;
  2222.     nreserved * : ARRAY 4 OF e.ULONG;
  2223.     a2024SyncRaster * : e.APTR;
  2224.     controlDeltaPAL * : INTEGER;
  2225.     controlDeltaNTSC * : INTEGER;
  2226.     currentMonitor * : MonitorSpecPtr;
  2227.     monitorList * : e.List;
  2228.     defaultMonitor * : MonitorSpecPtr;
  2229.     monitorListSemaphore * : e.SignalSemaphorePtr;
  2230.     displayInfoDataBase * : e.APTR;
  2231.     topLine * : INTEGER;
  2232.     actiViewCprSemaphore * : e.SignalSemaphorePtr;
  2233.     utilBase * : e.LibraryPtr;           (* for hook and tag utilities   *)
  2234.     execBase * : e.LibraryPtr;              (* to link with rom.lib *)
  2235.     bwshifts * :  e.APTR;
  2236.     strtFetchMasks * :  e.APTR;
  2237.     stopFetchMasks * :  e.APTR;
  2238.     overrun * :  e.APTR;
  2239.     realStops * :  e.APTR;
  2240.     spriteWidth * :  e.UWORD;   (* current width (in words) of sprites *)
  2241.     spriteFMode * :  e.UWORD;           (* current sprite fmode bits    *)
  2242.     softSprites * :  e.BYTE;  (* bit mask of size change knowledgeable sprites *)
  2243.     arraywidth * :  e.BYTE;
  2244.     defaultSpriteWidth * :  e.UWORD;    (* what width intuition wants *)
  2245.     sprMoveDisable * :  e.BYTE;
  2246.     wantChips * :  e.UBYTE;
  2247.     boardMemType * :  e.UBYTE;
  2248.     bugs * :  e.UBYTE;
  2249.     layersBase * :  e.APTR;
  2250.     colorMask * :  e.ULONG;
  2251.     iVector * :  e.APTR;
  2252.     iData * :  e.APTR;
  2253.     specialCounter * :  e.ULONG;        (* special for double buffering *)
  2254.     dBList * :  e.APTR;
  2255.     monitorFlags * :  s.SET16;
  2256.     scanDoubledSprites * :  e.UBYTE;
  2257.     bP3Bits * :  e.UBYTE;
  2258.     monitorVBlank * :  AnalogSignalInterval;
  2259.     monitor * :  MonitorSpecPtr;
  2260.     progData * :  e.APTR;
  2261.     extSprites * :  e.UBYTE;
  2262.     pad3 * :  e.UBYTE;
  2263.     gfxFlags * :  s.SET16;
  2264.     vBCounter * :  e.ULONG;
  2265.     hashTableSemaphore * :  e.SignalSemaphorePtr;
  2266.     hwEmul * :  POINTER TO ARRAY 9 OF e.APTR;
  2267.   END; (* GfxBase *)
  2268.  
  2269. CONST
  2270.  
  2271. (* Values for gfxBase.displayFlags *)
  2272.   ntsc *            = 1;
  2273.   genloc *          = 2;
  2274.   pal *             = 4;
  2275.   todaSafe *        = 8;
  2276.   reallyPal *       = 16;  (* what is actual crystal frequency
  2277.                               (as opposed to what bootmenu set the agnus to)?
  2278.                               (V39) *)
  2279.   lpenSwapFrames *  = 32;
  2280.                            (* LightPen software could set this bit if the
  2281.                             * "lpen-with-interlace" fix put in for V39
  2282.                             * does not work. This is true of a number of
  2283.                             * Agnus chips.
  2284.                             * (V40).
  2285.                             *)
  2286.  
  2287.   blitMsgFault *   = 4;
  2288.  
  2289. (* bits defs for ChipRevBits *)
  2290.   bigBlits *  = 0;
  2291.   hrAgnus *   = 0;
  2292.   hrDenise *  = 1;
  2293.   aaAlice *   = 2;
  2294.   aaLisa *    = 3;
  2295.   aaMLisa     = 4;  (* internal use only. *)
  2296.  
  2297. (* Pass ONE of these to SetChipRev() *)
  2298.   chipRevA *    = {hrAgnus};
  2299.   chipRevECS *  = {hrAgnus, hrDenise};
  2300.   chipRevAA *   = {aaAlice, aaLisa} + chipRevECS;
  2301.   chipRevBest * = {0..31};
  2302.  
  2303. (* memory type *)
  2304.   bus16 *          = 0;
  2305.   nmlCAS *         = 0;
  2306.   bus32 *          = 1;
  2307.   dblCAS *         = 2;
  2308.   bandwidth1x *    = {bus16, nmlCAS};
  2309.   bandwidth2xNml * = {bus32};
  2310.   bandwidth2xDbl * = {dblCAS};
  2311.   bandwidth4x *    = {bus32, dblCAS};
  2312.  
  2313. (* GfxFlags (private) *)
  2314.   newDatabase = 1;
  2315.  
  2316.   graphicsName * = "graphics.library";
  2317.  
  2318. (**-- Library Base variable --------------------------------------------*)
  2319.  
  2320.  
  2321. VAR
  2322.  
  2323.   gfx *, base * : GfxBasePtr;
  2324.  
  2325.  
  2326. (**-- Library Functions ------------------------------------------------*)
  2327.  
  2328. (*
  2329. **      $VER: graphics_protos.h 39.31 (29.4.93)
  2330. *)
  2331.  
  2332. (* ------ BitMap primitives ------*)
  2333.  
  2334. PROCEDURE BltBitMap* [base,-30]
  2335.   ( srcBitMap  [8] : BitMapPtr;
  2336.     xSrc       [0] : INTEGER;
  2337.     ySrc       [1] : INTEGER;
  2338.     destBitMap [9] : BitMapPtr;
  2339.     xDest      [2] : INTEGER;
  2340.     yDest      [3] : INTEGER;
  2341.     xSize      [4] : INTEGER;
  2342.     ySize      [5] : INTEGER;
  2343.     minterm    [6] : e.UBYTE;
  2344.     mask       [7] : s.SET8;
  2345.     tempA     [10] : PLANEPTR )
  2346.   : e.ULONG;
  2347.  
  2348. PROCEDURE BltTemplate* [base,-36]
  2349.   ( source [8] : PLANEPTR;
  2350.     xSrc   [0] : INTEGER;
  2351.     srcMod [1] : INTEGER;
  2352.     destRP [9] : RastPortPtr;
  2353.     xDest  [2] : INTEGER;
  2354.     yDest  [3] : INTEGER;
  2355.     xSize  [4] : INTEGER;
  2356.     ySize  [5] : INTEGER );
  2357.  
  2358. (* ------ Text routines ------*)
  2359.  
  2360. PROCEDURE ClearEOL* [base,-42]
  2361.   ( rp [9] : RastPortPtr );
  2362. PROCEDURE ClearScreen* [base,-48]
  2363.   ( rp [9] : RastPortPtr );
  2364. PROCEDURE TextLength* [base,-54]
  2365.   ( rp [9] : RastPortPtr;
  2366.     string [8] : ARRAY OF CHAR;
  2367.     count  [0] : LONGINT )
  2368.   : INTEGER;
  2369. PROCEDURE Text* [base,-60]
  2370.   ( rp     [9] : RastPortPtr;
  2371.     string [8] : ARRAY OF CHAR;
  2372.     count  [0] : LONGINT );
  2373. PROCEDURE SetFont* [base,-66]
  2374.   ( rp       [9] : RastPortPtr;
  2375.     textFont [8] : TextFontBasePtr );
  2376. PROCEDURE OpenFont* [base,-72]
  2377.   ( VAR textAttr [8] : TextAttr )
  2378.   : TextFontPtr;
  2379. PROCEDURE CloseFont* [base,-78]
  2380.   ( textFont [9] : TextFontBasePtr );
  2381. PROCEDURE AskSoftStyle* [base,-84]
  2382.   ( rp [9] : RastPortPtr )
  2383.   : s.SET8;
  2384. PROCEDURE SetSoftStyle* [base,-90]
  2385.   ( rp     [9] : RastPortPtr;
  2386.     style  [0] : s.SET8;
  2387.     enable [1] : s.SET8 )
  2388.   : s.SET8;
  2389.  
  2390. (* ------ Gels routines ------*)
  2391.  
  2392. PROCEDURE AddBob* [base,-96]
  2393.   ( bob [8] : BobPtr;
  2394.     rp  [9] : RastPortPtr );
  2395. PROCEDURE AddVSprite* [base,-102]
  2396.   ( vSprite [8] : VSpritePtr;
  2397.     rp      [9] : RastPortPtr );
  2398. PROCEDURE DoCollision* [base,-108]
  2399.   ( rp [9] : RastPortPtr );
  2400. PROCEDURE DrawGList* [base,-114]
  2401.   ( rp [9] : RastPortPtr;
  2402.     vp [8] : ViewPortPtr );
  2403. PROCEDURE InitGels* [base,-120]
  2404.   ( head      [8] : VSpritePtr;
  2405.     tail      [9] : VSpritePtr;
  2406.     gelsInfo [10] : GelsInfoPtr );
  2407. PROCEDURE InitMasks* [base,-126]
  2408.   ( vSprite [0] : VSpritePtr );
  2409. PROCEDURE RemIBob* [base,-132]
  2410.   ( bob [8] : BobPtr;
  2411.     rp  [9] : RastPortPtr;
  2412.     vp [10] : ViewPortPtr );
  2413. PROCEDURE RemVSprite* [base,-138]
  2414.   ( vSprite [8] : VSpritePtr );
  2415. PROCEDURE SetCollision* [base,-144]
  2416.   ( num      [0] : e.ULONG;
  2417.     routine  [8] : e.PROC;
  2418.     gelsInfo [9] : GelsInfoPtr );
  2419. PROCEDURE SortGList* [base,-150]
  2420.   ( rp [9] : RastPortPtr );
  2421. PROCEDURE AddAnimOb* [base,-156]
  2422.   ( anOb      [8] : AnimObPtr;
  2423.     VAR anKey [9] : AnimObPtr;
  2424.     rp       [10] : RastPortPtr );
  2425. PROCEDURE Animate* [base,-162]
  2426.   ( VAR anKey [8] : AnimObPtr;
  2427.     rp        [9] : RastPortPtr );
  2428. PROCEDURE GetGBuffers* [base,-168]
  2429.   ( anOb [8] : AnimObPtr;
  2430.     rp   [9] : RastPortPtr;
  2431.     flag [0] : BOOLEAN )
  2432.   : BOOLEAN;
  2433. PROCEDURE InitGMasks* [base,-174]
  2434.   ( anOb [8] : AnimObPtr );
  2435.  
  2436. (* ------        General graphics routines ------*)
  2437.  
  2438. PROCEDURE DrawEllipse* [base,-180]
  2439.   ( rp      [9] : RastPortPtr;
  2440.     xCenter [0] : INTEGER;
  2441.     yCenter [1] : INTEGER;
  2442.     a       [2] : INTEGER;
  2443.     b       [3] : INTEGER );
  2444. PROCEDURE AreaEllipse* [base,-186]
  2445.   ( rp      [9] : RastPortPtr;
  2446.     xCenter [0] : INTEGER;
  2447.     yCenter [1] : INTEGER;
  2448.     a       [2] : INTEGER;
  2449.     b       [3] : INTEGER )
  2450.   : BOOLEAN;
  2451. PROCEDURE LoadRGB4* [base,-192]
  2452.   ( vp     [8] : ViewPortPtr;
  2453.     colors [1] : ARRAY OF e.UWORD;
  2454.     count  [0] : LONGINT );
  2455. PROCEDURE InitRastPort* [base,-198]
  2456.   ( VAR rp [9] : RastPort );
  2457. PROCEDURE InitVPort* [base,-204]
  2458.   ( VAR vp [8] : ViewPort );
  2459. PROCEDURE OldMrgCop* [base,-210]
  2460.   ( view [9] : ViewPtr );
  2461. PROCEDURE MrgCop* [base,-210]
  2462.   ( view [9] : ViewPtr )
  2463.   : LONGINT;
  2464. PROCEDURE MakeVPort* [base,-216]
  2465.   ( view [8] : ViewPtr;
  2466.     vp   [9] : ViewPortPtr );
  2467. PROCEDURE LoadView* [base,-222]
  2468.   ( view [9] : ViewPtr );
  2469. PROCEDURE WaitBlit* [base,-228] ();
  2470. PROCEDURE SetRast* [base,-234]
  2471.   ( rp  [9] : RastPortPtr;
  2472.     pen [0] : e.UBYTE );
  2473. PROCEDURE Move* [base,-240]
  2474.   ( rp [9] : RastPortPtr;
  2475.     x  [0] : INTEGER;
  2476.     y  [1] : INTEGER );
  2477. PROCEDURE Draw* [base,-246]
  2478.   ( rp [9] : RastPortPtr;
  2479.     x  [0] : INTEGER;
  2480.     y  [1] : INTEGER );
  2481. PROCEDURE AreaMove* [base,-252]
  2482.   ( rp [9] : RastPortPtr;
  2483.     x  [0] : INTEGER;
  2484.     y  [1] : INTEGER )
  2485.   : BOOLEAN;
  2486. PROCEDURE AreaDraw* [base,-258]
  2487.   ( rp [9] : RastPortPtr;
  2488.     x  [0] : INTEGER;
  2489.     y  [1] : INTEGER )
  2490.   : BOOLEAN;
  2491. PROCEDURE AreaEnd* [base,-264]
  2492.   ( rp [9] : RastPortPtr )
  2493.   : BOOLEAN;
  2494. PROCEDURE WaitTOF* [base,-270] ();
  2495. PROCEDURE QBlit* [base,-276]
  2496.   ( blit [9] : h.BltnodePtr );
  2497. PROCEDURE InitArea* [base,-282]
  2498.   ( VAR areaInfo [8] : AreaInfo;
  2499.     vectorBuffer [9] : e.APTR;
  2500.     maxVectors   [0] : LONGINT );
  2501. PROCEDURE SetRGB4* [base,-288]
  2502.   ( vp    [8] : ViewPortPtr;
  2503.     index [0] : LONGINT;
  2504.     red   [1] : e.UBYTE;
  2505.     green [2] : e.UBYTE;
  2506.     blue  [3] : e.UBYTE );
  2507. PROCEDURE QBSBlit* [base,-294]
  2508.   ( blit [9] : h.BltnodePtr );
  2509. PROCEDURE BltClear* [base,-300]
  2510.   ( memBlock  [9] : PLANEPTR;
  2511.     byteCount [0] : e.ULONG;
  2512.     flags     [1] : s.SET32 );
  2513. PROCEDURE RectFill* [base,-306]
  2514.   ( rp   [9] : RastPortPtr;
  2515.     xMin [0] : INTEGER;
  2516.     yMin [1] : INTEGER;
  2517.     xMax [2] : INTEGER;
  2518.     yMax [3] : INTEGER );
  2519. PROCEDURE BltPattern* [base,-312]
  2520.   ( rp      [9] : RastPortPtr;
  2521.     mask    [8] : PLANEPTR;
  2522.     xMin    [0] : INTEGER;
  2523.     yMin    [1] : INTEGER;
  2524.     xMax    [2] : INTEGER;
  2525.     yMax    [3] : INTEGER;
  2526.     maskBPR [4] : INTEGER );
  2527. PROCEDURE ReadPixel* [base,-318]
  2528.   ( rp [9] : RastPortPtr;
  2529.     x  [0] : INTEGER;
  2530.     y  [1] : INTEGER )
  2531.   : LONGINT;
  2532. PROCEDURE WritePixel* [base,-324]
  2533.   ( rp [9] : RastPortPtr;
  2534.     x  [0] : INTEGER;
  2535.     y  [1] : INTEGER )
  2536.   : BOOLEAN;
  2537. PROCEDURE Flood* [base,-330]
  2538.   ( rp   [9] : RastPortPtr;
  2539.     mode [2] : e.ULONG;
  2540.     x    [0] : INTEGER;
  2541.     y    [1] : INTEGER )
  2542.   : BOOLEAN;
  2543. PROCEDURE PolyDraw* [base,-336]
  2544.   ( rp        [9] : RastPortPtr;
  2545.     count     [0] : INTEGER;
  2546.     polyTable [8] : ARRAY OF Point );
  2547. PROCEDURE PolyDrawList* [base,-336]
  2548.   ( rp        [9]   : RastPortPtr;
  2549.     count     [0]   : INTEGER;
  2550.     polyTable [8].. : INTEGER );
  2551. PROCEDURE SetAPen* [base,-342]
  2552.   ( rp  [9] : RastPortPtr;
  2553.     pen [0] : e.UBYTE );
  2554. PROCEDURE SetBPen* [base,-348]
  2555.   ( rp  [9] : RastPortPtr;
  2556.     pen [0] : e.UBYTE );
  2557. PROCEDURE SetDrMd* [base,-354]
  2558.   ( rp       [9] : RastPortPtr;
  2559.     drawMode [0] : s.SET8 );
  2560. PROCEDURE InitView* [base,-360]
  2561.   ( VAR view [9] : View );
  2562. PROCEDURE CBump* [base,-366]
  2563.   ( copList [9] : UCopListPtr );
  2564. PROCEDURE CMove* [base,-372]
  2565.   ( copList     [9] : UCopListPtr;
  2566.     destination [0] : e.APTR;
  2567.     data        [1] : e.UWORD );
  2568. PROCEDURE CWait* [base,-378]
  2569.   ( copList [9] : UCopListPtr;
  2570.     v       [0] : INTEGER;
  2571.     h       [1] : INTEGER );
  2572. PROCEDURE VBeamPos* [base,-384] ()
  2573.   : LONGINT;
  2574. PROCEDURE InitBitMap* [base,-390]
  2575.   ( VAR bitMap [8] : BitMap;
  2576.     depth      [0] : SHORTINT;
  2577.     width      [1] : INTEGER;
  2578.     height     [2] : INTEGER );
  2579. PROCEDURE ScrollRaster* [base,-396]
  2580.   ( rp   [9] : RastPortPtr;
  2581.     dx   [0] : INTEGER;
  2582.     dy   [1] : INTEGER;
  2583.     xMin [2] : INTEGER;
  2584.     yMin [3] : INTEGER;
  2585.     xMax [4] : INTEGER;
  2586.     yMax [5] : INTEGER );
  2587. PROCEDURE WaitBOVP* [base,-402]
  2588.   ( vp [8] : ViewPortPtr );
  2589. PROCEDURE GetSprite* [base,-408]
  2590.   ( VAR sprite [8] : SimpleSpriteBase;
  2591.     num        [0] : INTEGER )
  2592.   : INTEGER;
  2593. PROCEDURE FreeSprite* [base,-414]
  2594.   ( num [0] : INTEGER );
  2595. PROCEDURE ChangeSprite* [base,-420]
  2596.   ( vp         [8] : ViewPortPtr;
  2597.     VAR sprite [9] : SimpleSpriteBase;
  2598.     newData   [10] : PLANEPTR );
  2599. PROCEDURE MoveSprite* [base,-426]
  2600.   ( vp         [8] : ViewPortPtr;
  2601.     VAR sprite [9] : SimpleSpriteBase;
  2602.     x          [0] : INTEGER;
  2603.     y          [1] : INTEGER );
  2604. PROCEDURE LockLayerRom* [base,-432]
  2605.   ( layer [13] : LayerPtr );
  2606. PROCEDURE UnlockLayerRom* [base,-438]
  2607.   ( layer [13] : LayerPtr );
  2608. PROCEDURE SyncSBitMap* [base,-444]
  2609.   ( layer [8] : LayerPtr );
  2610. PROCEDURE CopySBitMap* [base,-450]
  2611.   ( layer [8] : LayerPtr );
  2612. PROCEDURE OwnBlitter* [base,-456] ();
  2613. PROCEDURE DisownBlitter* [base,-462] ();
  2614. PROCEDURE InitTmpRas* [base,-468]
  2615.   ( VAR tmpRas [8] : TmpRas;
  2616.     buffer     [9] : PLANEPTR;
  2617.     size       [0] : e.ULONG );
  2618. PROCEDURE AskFont* [base,-474]
  2619.   ( rp           [9] : RastPortPtr;
  2620.     VAR textAttr [8] : TextAttr );
  2621. PROCEDURE AddFont* [base,-480]
  2622.   ( textFont [9] : TextFontBasePtr );
  2623. PROCEDURE RemFont* [base,-486]
  2624.   ( textFont [9] : TextFontBasePtr );
  2625. PROCEDURE AllocRaster* [base,-492]
  2626.   ( width  [0] : e.UWORD;
  2627.     height [1] : e.UWORD )
  2628.   : PLANEPTR;
  2629. PROCEDURE FreeRaster* [base,-498]
  2630.   ( p      [8] : PLANEPTR;
  2631.     width  [0] : e.UWORD;
  2632.     height [1] : e.UWORD );
  2633. PROCEDURE AndRectRegion* [base,-504]
  2634.   ( region        [8] : RegionPtr;
  2635.     VAR rectangle [9] : RectangleBase );
  2636. PROCEDURE OrRectRegion* [base,-510]
  2637.   ( region        [8] : RegionPtr;
  2638.     VAR rectangle [9] : RectangleBase )
  2639.   : BOOLEAN;
  2640. PROCEDURE NewRegion* [base,-516] ()
  2641.   : RegionPtr;
  2642. PROCEDURE ClearRectRegion* [base,-522]
  2643.   ( region        [8] : RegionPtr;
  2644.     VAR rectangle [9] : RectangleBase )
  2645.   : BOOLEAN;
  2646. PROCEDURE ClearRegion* [base,-528]
  2647.   ( region [8] : RegionPtr );
  2648. PROCEDURE DisposeRegion* [base,-534]
  2649.   ( region [8] : RegionPtr );
  2650. PROCEDURE FreeVPortCopLists* [base,-540]
  2651.   ( vp [8] : ViewPortPtr );
  2652. PROCEDURE FreeCopList* [base,-546]
  2653.   ( copList [8] : CopListDummyPtr );
  2654. PROCEDURE ClipBlit* [base,-552] (
  2655.   srcRP   [8] : RastPortPtr;
  2656.   xSrc    [0] : INTEGER;
  2657.   ySrc    [1] : INTEGER;
  2658.   destRP  [9] : RastPortPtr;
  2659.   xDest   [2] : INTEGER;
  2660.   yDest   [3] : INTEGER;
  2661.   xSize   [4] : INTEGER;
  2662.   ySize   [5] : INTEGER;
  2663.   minterm [6] : e.UBYTE );
  2664. PROCEDURE XorRectRegion* [base,-558]
  2665.   ( region        [8] : RegionPtr;
  2666.     VAR rectangle [9] : RectangleBase )
  2667.   : BOOLEAN;
  2668. PROCEDURE FreeCprList* [base,-564]
  2669.   ( cprList [8] : CprlistPtr );
  2670. PROCEDURE GetColorMap* [base,-570]
  2671.   ( entries [0] : LONGINT )
  2672.   : ColorMapPtr;
  2673. PROCEDURE FreeColorMap* [base,-576]
  2674.   ( colorMap [8] : ColorMapPtr );
  2675. PROCEDURE GetRGB4* [base,-582]
  2676.   ( colorMap [8] : ColorMapPtr;
  2677.     entry    [0] : LONGINT )
  2678.   : INTEGER;
  2679. PROCEDURE ScrollVPort* [base,-588]
  2680.   ( vp [8] : ViewPortPtr );
  2681. PROCEDURE UCopperListInit* [base,-594]
  2682.   ( uCopList [8] : UCopListPtr;
  2683.     n        [0] : LONGINT )
  2684.   : CopListDummyPtr;
  2685. PROCEDURE FreeGBuffers* [base,-600]
  2686.   ( anOb [8] : AnimObPtr;
  2687.     rp   [9] : RastPortPtr;
  2688.     flag [0] : BOOLEAN );
  2689. PROCEDURE BltBitMapRastPort* [base,-606]
  2690.   ( srcBitMap [8] : BitMapPtr;
  2691.     xSrc      [0] : INTEGER;
  2692.     ySrc      [1] : INTEGER;
  2693.     destRP    [9] : RastPortPtr;
  2694.     xDest     [2] : INTEGER;
  2695.     yDest     [3] : INTEGER;
  2696.     xSize     [4] : INTEGER;
  2697.     ySize     [5] : INTEGER;
  2698.     minterm   [6] : e.UBYTE )
  2699.   : BOOLEAN;
  2700. PROCEDURE OrRegionRegion* [base,-612]
  2701.   ( srcRegion  [8] : RegionPtr;
  2702.     destRegion [9] : RegionPtr )
  2703.   : BOOLEAN;
  2704. PROCEDURE XorRegionRegion* [base,-618]
  2705.   ( srcRegion  [8] : RegionPtr;
  2706.     destRegion [9] : RegionPtr )
  2707.   : BOOLEAN;
  2708. PROCEDURE AndRegionRegion* [base,-624]
  2709.   ( srcRegion  [8] : RegionPtr;
  2710.     destRegion [9] : RegionPtr )
  2711.   : BOOLEAN;
  2712. PROCEDURE SetRGB4CM* [base,-630] (
  2713.   colorMap [8] : ColorMapPtr;
  2714.   index    [0] : INTEGER;
  2715.   red      [1] : e.UBYTE;
  2716.   green    [2] : e.UBYTE;
  2717.   blue     [3] : e.UBYTE );
  2718. PROCEDURE BltMaskBitMapRastPort* [base,-636] (
  2719.   srcBitMap [8] : BitMapPtr;
  2720.   xSrc      [0] : INTEGER;
  2721.   ySrc      [1] : INTEGER;
  2722.   destRP    [9] : RastPortPtr;
  2723.   xDest     [2] : INTEGER;
  2724.   yDest     [3] : INTEGER;
  2725.   xSize     [4] : INTEGER;
  2726.   ySize     [5] : INTEGER;
  2727.   minterm   [6] : e.UBYTE;
  2728.   bltMask  [10] : PLANEPTR );
  2729. PROCEDURE AttemptLockLayerRom* [base,-654]
  2730.   ( layer [13] : LayerPtr )
  2731.   : BOOLEAN;
  2732.  
  2733. (* --- functions in V36 or higher (distributed as Release 2.0) ---*)
  2734.  
  2735. PROCEDURE GfxNew* [base,-660]
  2736.   ( gfxNodeType [0] : e.ULONG )
  2737.   : ExtendedNodeBasePtr;
  2738. PROCEDURE GfxFree* [base,-666]
  2739.   ( gfxNodePtr [8] : ExtendedNodeBasePtr );
  2740. PROCEDURE GfxAssociate* [base,-672]
  2741.   ( associateNode [8] : ExtendedNodeBasePtr;
  2742.     gfxNodePtr    [9] : ExtendedNodeBasePtr );
  2743. PROCEDURE BitMapScale* [base,-678]
  2744.   ( bitScaleArgs [8] : BitScaleArgsPtr );
  2745. PROCEDURE ScalerDiv* [base,-684]
  2746.   ( factor      [0] : e.ULONG;
  2747.     numerator   [1] : e.ULONG;
  2748.     denominator [2] : e.ULONG )
  2749.   : e.UWORD;
  2750. PROCEDURE TextExtent* [base,-690]
  2751.   ( rp              [9] : RastPortPtr;
  2752.     string          [8] : ARRAY OF CHAR;
  2753.     count           [0] : LONGINT;
  2754.     VAR textExtent [10] : Textextent )
  2755.   : INTEGER;
  2756. PROCEDURE TextFit* [base,-696]
  2757.   ( rp                    [9] : RastPortPtr;
  2758.     string                [8] : ARRAY OF CHAR;
  2759.     strLen                [0] : e.ULONG;
  2760.     textExtent           [10] : TextextentPtr;
  2761.     constrainingExtent   [11] : TextextentPtr;
  2762.     strDirection          [1] : LONGINT;
  2763.     constrainingBitWidth  [2] : e.ULONG;
  2764.     constrainingBitHeight [3] : e.ULONG )
  2765.   : e.ULONG;
  2766. PROCEDURE GfxLookUp* [base,-702]
  2767.   ( associateNode [8] : ExtendedNodeBasePtr )
  2768.   : e.APTR;
  2769. PROCEDURE VideoControlA* [base,-708]
  2770.   ( colorMap [8] : ColorMapPtr;
  2771.     tagarray [9] : ARRAY OF u.TagItem )
  2772.   : BOOLEAN;
  2773. PROCEDURE VideoControl* [base,-708]
  2774.   ( colorMap [8]   : ColorMapPtr;
  2775.     tagarray [9].. : u.Tag )
  2776.   : BOOLEAN;
  2777. PROCEDURE OpenMonitor* [base,-714]
  2778.   ( monitorName [9] : ARRAY OF CHAR;
  2779.     displayID   [0] : e.ULONG )
  2780.   : MonitorSpecPtr;
  2781. PROCEDURE CloseMonitor* [base,-720]
  2782.   ( monitorSpec [8] : MonitorSpecPtr )
  2783.   : BOOLEAN;
  2784. PROCEDURE FindDisplayInfo* [base,-726]
  2785.   ( displayID [0] : e.ULONG )
  2786.   : DisplayInfoHandle;
  2787. PROCEDURE NextDisplayInfo* [base,-732]
  2788.   ( displayID [0] : e.ULONG )
  2789.   : e.ULONG;
  2790. PROCEDURE AddDisplayInfo* [base,-738];
  2791. PROCEDURE AddDisplayInfoData* [base,-744];
  2792. PROCEDURE SetDisplayInfoData* [base,-750]
  2793.   ( handle    [8] : DisplayInfoHandle;
  2794.     buf       [9] : ARRAY OF SYS.BYTE;
  2795.     size      [0] : e.ULONG;
  2796.     tagID     [1] : e.ULONG;
  2797.     displayID [2] : e.ULONG)
  2798.   : e.ULONG;
  2799. PROCEDURE GetDisplayInfoData* [base,-756]
  2800.   ( handle    [8] : DisplayInfoHandle;
  2801.     VAR buf   [9] : ARRAY OF SYS.BYTE;
  2802.     size      [0] : e.ULONG;
  2803.     tagID     [1] : e.ULONG;
  2804.     displayID [2] : e.ULONG )
  2805.   : e.ULONG;
  2806. PROCEDURE FontExtent* [base,-762]
  2807.   ( font           [8] : TextFontBasePtr;
  2808.     VAR fontExtent [9] : Textextent );
  2809. PROCEDURE ReadPixelLine8* [base,-768]
  2810.   ( rp         [8] : RastPortPtr;
  2811.     xstart     [0] : e.UWORD;
  2812.     ystart     [1] : e.UWORD;
  2813.     width      [2] : e.ULONG;
  2814.     VAR array [10] : ARRAY OF SYS.BYTE;
  2815.     tempRP     [9] : RastPortPtr )
  2816.   : LONGINT;
  2817. PROCEDURE WritePixelLine8* [base,-774]
  2818.   ( rp     [8] : RastPortPtr;
  2819.     xstart [0] : e.UWORD;
  2820.     ystart [1] : e.UWORD;
  2821.     width  [2] : e.ULONG;
  2822.     array [10] : ARRAY OF SYS.BYTE;
  2823.     tempRP [9] : RastPortPtr )
  2824.   : LONGINT;
  2825. PROCEDURE ReadPixelArray8* [base,-780]
  2826.   ( rp         [8] : RastPortPtr;
  2827.     xstart     [0] : e.UWORD;
  2828.     ystart     [1] : e.UWORD;
  2829.     xstop      [2] : e.UWORD;
  2830.     ystop      [3] : e.UWORD;
  2831.     VAR array [10] : ARRAY OF SYS.BYTE;
  2832.     temprp     [9] : RastPortPtr )
  2833.   : LONGINT;
  2834. PROCEDURE WritePixelArray8* [base,-786]
  2835.   ( rp         [8] : RastPortPtr;
  2836.     xstart     [0] : e.UWORD;
  2837.     ystart     [1] : e.UWORD;
  2838.     xstop      [2] : e.UWORD;
  2839.     ystop      [3] : e.UWORD;
  2840.     VAR array [10] : ARRAY OF SYS.BYTE;
  2841.     temprp     [9] : RastPortPtr )
  2842.   : LONGINT;
  2843. PROCEDURE GetVPModeID* [base,-792]
  2844.   ( vp [8] : ViewPortPtr )
  2845.   : LONGINT;
  2846. PROCEDURE ModeNotAvailable* [base,-798]
  2847.   ( modeID [0] : e.ULONG )
  2848.   : LONGINT;
  2849. PROCEDURE WeighTAMatchA* [base,-804]
  2850.   ( VAR reqTextAttr    [8] : TextAttr;
  2851.     VAR targetTextAttr [9] : TextAttr;
  2852.     targetTags        [10] : ARRAY OF u.TagItem )
  2853.   : INTEGER;
  2854. PROCEDURE WeighTAMatch* [base,-804]
  2855.   ( VAR reqTextAttr    [8]   : TextAttr;
  2856.     VAR targetTextAttr [9]   : TextAttr;
  2857.     targetTags        [10].. : u.Tag )
  2858.   : INTEGER;
  2859. PROCEDURE EraseRect* [base,-810]
  2860.   ( rp   [9] : RastPortPtr;
  2861.     xMin [0] : INTEGER;
  2862.     yMin [1] : INTEGER;
  2863.     xMax [2] : INTEGER;
  2864.     yMax [3] : INTEGER );
  2865. PROCEDURE ExtendFontA* [base,-816]
  2866.   ( font     [8] : TextFontBasePtr;
  2867.     fontTags [9] : ARRAY OF u.TagItem )
  2868.   : e.ULONG;
  2869. PROCEDURE ExtendFont* [base,-816]
  2870.   ( font     [8]   : TextFontBasePtr;
  2871.     fontTags [9].. : u.Tag )
  2872.   : e.ULONG;
  2873. PROCEDURE StripFont* [base,-822]
  2874.   ( font [8] : TextFontBasePtr );
  2875.  
  2876. (*--- functions in V39 or higher (Release 3) ---*)
  2877.  
  2878. PROCEDURE CalcIVG* [base,-828]
  2879.   ( v  [8] : ViewPtr;
  2880.     vp [9] : ViewPortPtr )
  2881.   : e.UWORD;
  2882. PROCEDURE AttachPalExtra* [base,-834]
  2883.   ( cm [8] : ColorMapPtr;
  2884.     vp [9] : ViewPortPtr )
  2885.   : LONGINT;
  2886. PROCEDURE ObtainBestPenA* [base,-840]
  2887.   ( cm   [8] : ColorMapPtr;
  2888.     r    [1] : e.ULONG;
  2889.     g    [2] : e.ULONG;
  2890.     b    [3] : e.ULONG;
  2891.     tags [9] : ARRAY OF u.TagItem )
  2892.   : LONGINT;
  2893. PROCEDURE ObtainBestPen* [base,-840]
  2894.   ( cm   [8]  : ColorMapPtr;
  2895.     r    [1]  : e.ULONG;
  2896.     g    [2]  : e.ULONG;
  2897.     b    [3]  : e.ULONG;
  2898.     tags [9]..: u.Tag )
  2899.   : LONGINT;
  2900. PROCEDURE SetRGB32* [base,-852]
  2901.   ( vp [8] : ViewPortPtr;
  2902.     n  [0] : e.ULONG;
  2903.     r  [1] : e.ULONG;
  2904.     g  [2] : e.ULONG;
  2905.     b  [3] : e.ULONG );
  2906. PROCEDURE GetAPen* [base,-858]
  2907.   ( rp [8] : RastPortPtr )
  2908.   : e.ULONG;
  2909. PROCEDURE GetBPen* [base,-864]
  2910.   ( rp [8] : RastPortPtr )
  2911.   : e.ULONG;
  2912. PROCEDURE GetDrMd* [base,-870]
  2913.   ( rp [8] : RastPortPtr )
  2914.   : s.SET32;
  2915. PROCEDURE GetOutlinePen* [base,-876]
  2916.   ( rp [8] : RastPortPtr )
  2917.   : e.ULONG;
  2918. PROCEDURE LoadRGB32* [base,-882]
  2919.   ( vp        [8] : ViewPortPtr;
  2920.     VAR table [9] : ARRAY OF e.ULONG );
  2921. PROCEDURE SetChipRev* [base,-888]
  2922.   ( want [0] : s.SET32 )
  2923.   : s.SET32;
  2924. PROCEDURE SetABPenDrMd* [base,-894]
  2925.   ( rp [9]       : RastPortPtr;
  2926.     apen [0]     : e.ULONG;
  2927.     bpen [1]     : e.ULONG;
  2928.     drawmode [2] : s.SET8 );
  2929. PROCEDURE GetRGB32* [base,-900]
  2930.   ( cm         [8] : ColorMapPtr;
  2931.     firstcolor [0] : e.ULONG;
  2932.     ncolors    [1] : e.ULONG;
  2933.     VAR table  [9] : ARRAY OF e.ULONG );
  2934. PROCEDURE AllocBitMap* [base,-918]
  2935.   ( sizex [0]        : e.ULONG;
  2936.     sizey [1]        : e.ULONG;
  2937.     depth [2]        : e.ULONG;
  2938.     flags [3]        : s.SET32;
  2939.     friendBitmap [8] : BitMapPtr )
  2940.   : BitMapPtr;
  2941. PROCEDURE FreeBitMap* [base,-924]
  2942.   ( bm [8] : BitMapPtr );
  2943. PROCEDURE GetExtSpriteA* [base,-930]
  2944.   ( ss  [10] : ExtSpritePtr;
  2945.     tags [9] : ARRAY OF u.TagItem )
  2946.   : LONGINT;
  2947. PROCEDURE GetExtSprite* [base,-930]
  2948.   ( ss  [10]  : ExtSpritePtr;
  2949.     tags [9]..: u.Tag )
  2950.   : LONGINT;
  2951. PROCEDURE CoerceMode* [base,-936]
  2952.   ( vp        [8] : ViewPortPtr;
  2953.     monitorid [0] : e.ULONG;
  2954.     flags     [1] : e.ULONG )
  2955.   : e.ULONG;
  2956. PROCEDURE ChangeVPBitMap* [base,-942]
  2957.   ( vp [8]  : ViewPortPtr;
  2958.     bm [9]  : BitMapPtr;
  2959.     db [10] : DBufInfoPtr );
  2960. PROCEDURE ReleasePen* [base,-948]
  2961.   ( cm [8] : ColorMapPtr;
  2962.     n  [0] : e.ULONG );
  2963. PROCEDURE ObtainPen* [base,-954]
  2964.   ( cm [8] : ColorMapPtr;
  2965.     n  [0] : e.ULONG;
  2966.     r  [1] : e.ULONG;
  2967.     g  [2] : e.ULONG;
  2968.     b  [3] : e.ULONG;
  2969.     f  [4] : LONGINT )
  2970.   : e.ULONG;
  2971. PROCEDURE GetBitMapAttr* [base,-960]
  2972.   ( bm      [8] : BitMapPtr;
  2973.     attrnum [1] : e.ULONG )
  2974.   : e.ULONG;
  2975. PROCEDURE AllocDBufInfo* [base,-966]
  2976.   ( vp [8] : ViewPortPtr )
  2977.   : DBufInfoPtr;
  2978. PROCEDURE FreeDBufInfo* [base,-972]
  2979.   ( dbi [9] : DBufInfoPtr );
  2980. PROCEDURE SetOutlinePen* [base,-978]
  2981.   ( rp  [8] : RastPortPtr;
  2982.     pen [0] : e.ULONG )
  2983.   : e.ULONG;
  2984. PROCEDURE SetWriteMask* [base,-984]
  2985.   ( rp  [8] : RastPortPtr;
  2986.     msk [0] : s.SET32 )
  2987.   : BOOLEAN;
  2988. PROCEDURE SetMaxPen* [base,-990]
  2989.   ( rp     [8] : RastPortPtr;
  2990.     maxpen [0] : e.ULONG );
  2991. PROCEDURE SetRGB32CM* [base,-996]
  2992.   ( cm [8] : ColorMapPtr;
  2993.     n  [0] : e.ULONG;
  2994.     r  [1] : e.ULONG;
  2995.     g  [2] : e.ULONG;
  2996.     b  [3] : e.ULONG );
  2997. PROCEDURE ScrollRasterBF* [base,-1002]
  2998.   ( rp   [9] : RastPortPtr;
  2999.     dx   [0] : LONGINT;
  3000.     dy   [1] : LONGINT;
  3001.     xMin [2] : LONGINT;
  3002.     yMin [3] : LONGINT;
  3003.     xMax [4] : LONGINT;
  3004.     yMax [5] : LONGINT );
  3005. PROCEDURE FindColor* [base,-1008]
  3006.   ( cm      [11] : ColorMapPtr;
  3007.     r        [1] : e.ULONG;
  3008.     g        [2] : e.ULONG;
  3009.     b        [3] : e.ULONG;
  3010.     maxcolor [4] : LONGINT )
  3011.   : LONGINT;
  3012. PROCEDURE AllocSpriteDataA* [base,-1020]
  3013.   ( bm  [10] : BitMapPtr;
  3014.     tags [9] : ARRAY OF u.TagItem )
  3015.   : ExtSpritePtr;
  3016. PROCEDURE AllocSpriteData* [base,-1020]
  3017.   ( bm  [10]  : BitMapPtr;
  3018.     tags [9]..: u.Tag )
  3019.   : ExtSpritePtr;
  3020. PROCEDURE ChangeExtSpriteA* [base,-1026]
  3021.   ( vp         [8] : ViewPortPtr;
  3022.     oldsprite  [9] : ExtSpritePtr;
  3023.     newsprite [10] : ExtSpritePtr;
  3024.     tags      [11] : ARRAY OF u.TagItem )
  3025.   : LONGINT;
  3026. PROCEDURE ChangeExtSprite* [base,-1026]
  3027.   ( vp         [8]  : ViewPortPtr;
  3028.     oldsprite  [9]  : ExtSpritePtr;
  3029.     newsprite [10]  : ExtSpritePtr;
  3030.     tags      [11]..: u.Tag )
  3031.   : LONGINT;
  3032. PROCEDURE FreeSpriteData* [base,-1032]
  3033.   ( sp [10] : ExtSpritePtr );
  3034. PROCEDURE SetRPAttrsA* [base,-1038]
  3035.   ( rp   [8] : RastPortPtr;
  3036.     tags [9] : ARRAY OF u.TagItem );
  3037. PROCEDURE SetRPAttrs* [base,-1038]
  3038.   ( rp   [8]  : RastPortPtr;
  3039.     tags [9]..: u.Tag );
  3040. PROCEDURE GetRPAttrsA* [base,-1044]
  3041.   ( rp   [8] : RastPortPtr;
  3042.     tags [9] : ARRAY OF u.TagItem );
  3043. PROCEDURE GetRPAttrs* [base,-1044]
  3044.   ( rp   [8]  : RastPortPtr;
  3045.     tags [9]..: u.Tag );
  3046. PROCEDURE BestModeIDA* [base,-1050]
  3047.   ( tags [8] : ARRAY OF u.TagItem )
  3048.   : e.ULONG;
  3049. PROCEDURE BestModeID* [base,-1050]
  3050.   ( tags [8]..: u.Tag )
  3051.   : e.ULONG;
  3052.  
  3053. (*--- functions in V40 or higher (Release 3.1) ---*)
  3054.  
  3055. PROCEDURE WriteChunkyPixels* [base,-1056]
  3056.   ( rp          [8] : RastPortPtr;
  3057.     xstart      [0] : e.ULONG;
  3058.     ystart      [1] : e.ULONG;
  3059.     xstop       [2] : e.ULONG;
  3060.     ystop       [3] : e.ULONG;
  3061.     array      [10] : ARRAY OF SYS.BYTE;
  3062.     bytesperrow [4] : LONGINT );
  3063.  
  3064. (**-- C Macros defined as procedures -----------------------------------*)
  3065.  
  3066. <*$LongVars+*>
  3067.  
  3068. (*
  3069. **      $VER: gfxmacros.h 39.3 (31.5.93)
  3070. *)
  3071.  
  3072. (**-----------------------------------*)
  3073. (* This macro is obsolete as of V39. AllocBitMap() should be used for allocating
  3074.    bitmap data, since it knows about the machine's particular alignment
  3075.    restrictions.
  3076. *)
  3077. PROCEDURE [0] RASSIZE* (w, h : INTEGER) : LONGINT;
  3078.  
  3079. BEGIN (* RASSIZE *)
  3080.   RETURN ( h * (((LONG (w) + 15) DIV 16) * 2))
  3081. END RASSIZE;
  3082.  
  3083. (**-----------------------------------*)
  3084. PROCEDURE [0] InitAnimate * (VAR anKey: AnimObPtr);
  3085. BEGIN
  3086.   anKey := NIL;
  3087. END InitAnimate;
  3088.  
  3089. (**-----------------------------------*)
  3090. PROCEDURE [0] RemBob * (b: BobPtr);
  3091. BEGIN
  3092.   INCL(b.flags,bobsAway);
  3093. END RemBob;
  3094.  
  3095. (**-----------------------------------*)
  3096. PROCEDURE [0] OnDisplay* ();
  3097.  
  3098. BEGIN (* OnDisplay *)
  3099.   h.custom.dmacon := {h.dmaSet, h.raster}
  3100. END OnDisplay;
  3101.  
  3102. (**-----------------------------------*)
  3103. PROCEDURE [0] OffDisplay* ();
  3104.  
  3105. BEGIN (* OffDisplay *)
  3106.   h.custom.dmacon := {h.raster}
  3107. END OffDisplay;
  3108.  
  3109. (**-----------------------------------*)
  3110. PROCEDURE [0] OnSprite* ();
  3111.  
  3112. BEGIN (* OnSprite *)
  3113.   h.custom.dmacon := {h.dmaSet, h.sprite}
  3114. END OnSprite;
  3115.  
  3116. (**-----------------------------------*)
  3117. PROCEDURE [0] OffSprite* ();
  3118.  
  3119. BEGIN (* OffSprite *)
  3120.   h.custom.dmacon := {h.sprite}
  3121. END OffSprite;
  3122.  
  3123. (**-----------------------------------*)
  3124. PROCEDURE [0] OnVBlank* ();
  3125.  
  3126. BEGIN (* OnVBlank *)
  3127.   h.custom.intena := {h.dmaSet, h.vertb}
  3128. END OnVBlank;
  3129.  
  3130. (**-----------------------------------*)
  3131. PROCEDURE [0] OffVBlank* ();
  3132.  
  3133. BEGIN (* OffVBlank *)
  3134.   h.custom.intena := {h.vertb}
  3135. END OffVBlank;
  3136.  
  3137.  
  3138. (**-----------------------------------*)
  3139. PROCEDURE [0] SetDrPt* (w : RastPortPtr; p : e.UWORD);
  3140.  
  3141. BEGIN (* SetDrPt *)
  3142.   w.linePtrn := p; INCL (w.flags, frstDot); w.linpatcnt := 15
  3143. END SetDrPt;
  3144.  
  3145. (**-----------------------------------*)
  3146. PROCEDURE [0] SetAfPt* (w : RastPortPtr; p : e.APTR; n : SHORTINT);
  3147.  
  3148. BEGIN (* SetAfPt *)
  3149.   w.areaPtrn := p; w.areaPtSz := n
  3150. END SetAfPt;
  3151.  
  3152. (**-----------------------------------*)
  3153. PROCEDURE [0] SetOPen* (w : RastPortPtr; c : SHORTINT);
  3154.  
  3155. BEGIN (* SetOPen *)
  3156.   w.aOlPen := c; INCL (w.flags, areaOutline)
  3157. END SetOPen;
  3158.  
  3159. (**-----------------------------------*)
  3160. PROCEDURE [0] SetWrMsk* (w : RastPortPtr; m : s.SET8);
  3161.  
  3162. BEGIN (* SetWrMsk *)
  3163.   w.mask := m
  3164. END SetWrMsk;
  3165.  
  3166. (* the SafeSetxxx macros are backwards (pre V39 graphics) compatible versions *)
  3167. (* using these macros will make your code do the right thing under V39 AND V37 *)
  3168. (**-----------------------------------*)
  3169. PROCEDURE [0] SafeSetOutlinePen* (w : RastPortPtr; c : SHORTINT);
  3170.   VAR ignore : LONGINT;
  3171. BEGIN (* SafeSetOutlinePen *)
  3172.   IF base.libNode.version < 39 THEN
  3173.     w.aOlPen := c; INCL (w.flags, areaOutline)
  3174.   ELSE
  3175.     ignore := SetOutlinePen (w, c)
  3176.   END
  3177. END SafeSetOutlinePen;
  3178.  
  3179. (**-----------------------------------*)
  3180. PROCEDURE [0] SafeSetWriteMask* (w : RastPortPtr; m : s.SET8);
  3181.   VAR ignore : BOOLEAN;
  3182. BEGIN (* SafeSetWriteMask *)
  3183.   IF base.libNode.version < 39 THEN
  3184.     w.mask := m
  3185.   ELSE
  3186.     ignore := SetWriteMask (w, LONG (LONG (m)))
  3187.   END
  3188. END SafeSetWriteMask;
  3189.  
  3190. (**-----------------------------------*)
  3191. PROCEDURE [0] BndryOff* (w : RastPortPtr);
  3192.  
  3193. BEGIN (* BndryOff *)
  3194.   EXCL (w.flags, areaOutline)
  3195. END BndryOff;
  3196.  
  3197. (**-----------------------------------*)
  3198. PROCEDURE [0] CINIT* (c : UCopListPtr; n : LONGINT);
  3199.  
  3200. BEGIN (* CINIT *)
  3201.   SYS.PUTREG (0, UCopperListInit (c, n))
  3202. END CINIT;
  3203.  
  3204. (**-----------------------------------*)
  3205. PROCEDURE [0] CMOVE*
  3206.   (c : UCopListPtr; a : e.APTR; b : e.UWORD );
  3207.  
  3208. BEGIN (* CMOVE *)
  3209.   CMove (c, a, b); CBump (c)
  3210. END CMOVE;
  3211.  
  3212. (**-----------------------------------*)
  3213. PROCEDURE [0] CWAIT* (c : UCopListPtr; a : INTEGER; b : INTEGER );
  3214.  
  3215. BEGIN (* CWAIT *)
  3216.   CWait (c, a, b); CBump (c)
  3217. END CWAIT;
  3218.  
  3219. (**-----------------------------------*)
  3220. PROCEDURE [0] CEND* (c : UCopListPtr);
  3221.  
  3222. BEGIN (* CEND *)
  3223.  CWAIT (c, 10000, 255)
  3224. END CEND;
  3225.  
  3226.  
  3227. (**-----------------------------------*)
  3228. PROCEDURE [0] DrawCircle* (rp : RastPortPtr; cx, cy, r : INTEGER);
  3229.  
  3230. BEGIN (* DrawCircle *)
  3231.   DrawEllipse (rp, cx, cy, r, r)
  3232. END DrawCircle;
  3233.  
  3234.  
  3235. (**-----------------------------------*)
  3236. PROCEDURE [0] AreaCircle* (rp : RastPortPtr; cx, cy, r : INTEGER)
  3237.   : BOOLEAN;
  3238.  
  3239. BEGIN (* AreaCircle *)
  3240.   RETURN AreaEllipse (rp, cx, cy, r, r)
  3241. END AreaCircle;
  3242.  
  3243.  
  3244. (**-- Library Base Variable --------------------------------------------*)
  3245.  
  3246. <*$LongVars-*>
  3247.  
  3248. PROCEDURE* [0] Close (VAR rc : LONGINT);
  3249.  
  3250. BEGIN (* Close *)
  3251.   IF base # NIL THEN e.CloseLibrary (base) END;
  3252. END Close;
  3253.  
  3254. BEGIN (* Graphics *)
  3255.   base := SYS.VAL (GfxBasePtr,
  3256.                    e.OpenLibrary (graphicsName, e.libraryMinimum));
  3257.   IF base = NIL THEN HALT (100) END;
  3258.   gfx := base;
  3259.   Kernel.SetCleanup (Close)
  3260. END Graphics.
  3261.